# stl_set.h File Reference

## Detailed Description

This is an internal header file, included by other library headers. You should not attempt to use it directly.

Definition in file stl_set.h.

Go to the source code of this file.

## Namespaces

- namespace std

## Defines

- #define _SET_H

## Functions

- template<class _Key, class _Compare, class _Alloc> bool operator!= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> bool operator< (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> bool operator<= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> bool operator== (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> bool operator> (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> bool operator>= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
- template<class _Key, class _Compare, class _Alloc> void swap (set< _Key, _Compare, _Alloc > &__x, set< _Key, _Compare, _Alloc > &__y)

## Function Documentation

bool std::operator!= | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

| Returns !(x == y). Definition at line 560 of file stl_set.h.

bool operator< | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

Set ordering relation.

Parameters:

  | x | A set.
  | y | A set of the same type as x.

Returns:
  True iff x is lexicographically less than y.

This is a total ordering relation. It is linear in the size of the maps. The elements must be comparable with `<`.

See std::lexicographical_compare() for how the determination is made.

Definition at line 553 of file stl_set.h.

bool std::operator<= | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

| Returns !(y < x). Definition at line 574 of file stl_set.h.

bool operator== | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

Set equality comparison.

Parameters:

  | x | A set.
  | y | A set of the same type as x.

Returns:
  True iff the size and elements of the sets are equal.

This is an equivalence relation. It is linear in the size of the sets. Sets are considered equivalent if their sizes are equal, and if corresponding elements compare equal.

Definition at line 536 of file stl_set.h.

References set::_M_t.

bool std::operator> | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

| Returns y < x. Definition at line 567 of file stl_set.h.

bool std::operator>= | ( | const set< _Key, _Compare, _Alloc > & | __x,
|  | const set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

| Returns !(x < y). Definition at line 581 of file stl_set.h.

void std::swap | ( | set< _Key, _Compare, _Alloc > & | __x,
|  | set< _Key, _Compare, _Alloc > & | __y
| ) | `[inline]`

| See std::set::swap(). Definition at line 588 of file stl_set.h. References set::swap().