Namespaces
Variants

operator==, operator<=> (std::basic_stacktrace)

From cppreference.net
template < class Allocator2 >

friend bool operator == ( const basic_stacktrace & lhs,

const basic_stacktrace < Allocator2 > & rhs ) noexcept ;
(1) (C++23 이후)
template < class Allocator2 >

friend std:: strong_ordering
operator <=> ( const basic_stacktrace & lhs,

const basic_stacktrace < Allocator2 > & rhs ) noexcept ;
(2) (C++23 이후)
1) lhs rhs 의 내용이 동일한지 확인합니다. 즉, 동일한 수의 요소를 가지며 lhs 의 각 요소가 rhs 의 동일한 위치에 있는 요소와 동일한지 비교합니다.
다음과 동일함 return std:: equal ( lhs. begin ( ) , lhs. end ( ) , rhs. begin ( ) , rhs. end ( ) ) ; .
2) lhs rhs 의 스택트레이스 항목 개수가 서로 다르면 이들의 상대적 순서를 반환합니다. 그렇지 않은 경우( lhs rhs 의 요소 개수가 동일한 경우), lhs rhs 의 요소들에 대한 사전식 순서를 반환합니다.
다음과 동일함
if ( auto cmp = lhs. size ( ) <=> rhs. size ( ) ; cmp ! = 0 )

return cmp ;
else
return std:: lexicographical_compare_three_way ( lhs. begin ( ) , lhs. end ( ) ,

rhs. begin ( ) , rhs. end ( ) ) ;
.

이러한 함수 템플릿은 일반적인 unqualified lookup 또는 qualified lookup 으로는 보이지 않으며, std::basic_stacktrace<Allocator>가 인자들의 연관 클래스일 때에만 argument-dependent lookup 에 의해 찾을 수 있습니다.

< , <= , > , >= , 그리고 != 연산자들은 각각 합성됩니다 operator <=> operator == 로부터.

목차

매개변수

lhs, rhs - basic_stacktrace 비교할 내용을 가진 스택 트레이스

반환값

1) true 만약 lhs rhs 의 내용이 동일하면, false 그렇지 않으면.
2) lhs. size ( ) <=> rhs. size ( ) 결과가 std::strong_order::equal 이 아닌 경우, 그렇지 않으면 lhs rhs 요소들의 사전식 순서.

복잡도

1,2) 만약 lhs rhs 의 크기가 다르면 상수 시간, 그렇지 않으면 lhs 의 크기에 선형 시간.

예제