template<class Allocator2>
friendbool operator==(const basic_stacktrace& lhs,
const basic_stacktrace<Allocator2>& rhs)noexcept; | (1) | (since C++23) |
template<class Allocator2>
friendstd::strong_ordering operator<=>(const basic_stacktrace& lhs,
const basic_stacktrace<Allocator2>& rhs)noexcept; | (2) | (since C++23) |
| | |
1) Checks if the contents oflhs andrhs are equal, that is, they have the same number of elements and each element inlhs compares equal with the element inrhs at the same position.
Equivalent to
returnstd::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());.
2) Returns the relative order of the numbers of stacktrace entries inlhs andrhs if they are not equal. Otherwise (if the numbers of elements oflhs andrhs are equal), returns the lexicographical order of the elements oflhs andrhs.
These function templates are not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup when std::basic_stacktrace<Allocator> is an associated class of the arguments.
The<
,<=
,>
,>=
, and!=
operators aresynthesized fromoperator<=> andoperator== respectively.
[edit]Parameters
lhs, rhs | - | basic_stacktrace s whose contents to compare |
[edit]Return value
1)true if the contents oflhs andrhs are equal,false otherwise.
2)lhs.size()<=> rhs.size() if the result is notstd::strong_order::equal, the lexicographical order of the elements oflhs andrhs otherwise.
[edit]Complexity
1,2) Constant iflhs andrhs are of different size, linear in the size oflhs otherwise.
[edit]Example
| This section is incomplete Reason: no example |