vector::operator==

vector::operator== (비교 연산자)

operator==는 두 std::vector의 내용을 순서대로 비교해요.

출처: cppreference

본문

operator==는 두 std::vector의 내용을 요소 단위로 비교해요. C++20의 <=> 연산자를 통해 <, <=, >, >=, != 연산자도 합성돼요.

template< class T, class Alloc >
bool operator==( const std::vector<T, Alloc>& lhs,
                 const std::vector<T, Alloc>& rhs );

반환값 (Return value)

내용이 같으면 true, 그렇지 않으면 false예요.

복잡도 (Complexity)

요소 개수에 선형이에요.

더 알아보기 (Learn more)

cppreference