bsl::operator==

Return true if lhs and rhs have the same value, and false otherwise.

Synopsis

Declared in <bslstl_set.h>

template<
    class KEY,
    class COMPARATOR,
    class ALLOCATOR>
bool
operator==(
    set<KEY, COMPARATOR, ALLOCATOR> const& lhs,
    set<KEY, COMPARATOR, ALLOCATOR> const& rhs);

Description

Two set objects lhs and rhs have the same value if they have the same number of keys, and each element in the ordered sequence of keys of lhs has the same value as the corresponding element in the ordered sequence of keys of rhs. This method requires that the (template parameter) type KEY be equality-comparable (see {Requirements on KEY}).

Return Value

true if the sets compare equal

Parameters

NameDescription
lhsfirst set to compare
rhssecond set to compare