# stl_list.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_list.h.

Go to the source code of this file.

## Namespaces

- namespace std

## Defines

- #define _LIST_H

## Functions

- template<typename _Tp, typename _Alloc> bool operator!= (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Val> bool operator!= (const _List_iterator< _Val > &__x, const _List_const_iterator< _Val > &__y)
- template<typename _Tp, typename _Alloc> bool operator< (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Tp, typename _Alloc> bool operator<= (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Tp, typename _Alloc> bool operator== (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Val> bool operator== (const _List_iterator< _Val > &__x, const _List_const_iterator< _Val > &__y)
- template<typename _Tp, typename _Alloc> bool operator> (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Tp, typename _Alloc> bool operator>= (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
- template<typename _Tp, typename _Alloc> void swap (list< _Tp, _Alloc > &__x, list< _Tp, _Alloc > &__y)

## Function Documentation

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

| Based on operator==. Definition at line 1214 of file stl_list.h.

bool std::operator< | ( | const list< _Tp, _Alloc > & | __x,
|  | const list< _Tp, _Alloc > & | __y
| ) | `[inline]`

List ordering relation.

Parameters:

  | x | A list.
  | y | A list 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 lists. The elements must be comparable with `<`.

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

Definition at line 1207 of file stl_list.h.

References std::lexicographical_compare().

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

| Based on operator<. Definition at line 1226 of file stl_list.h.

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

List equality comparison.

Parameters:

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

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

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

Definition at line 1178 of file stl_list.h.

References list::begin(), and list::end().

bool std::operator> | ( | const list< _Tp, _Alloc > & | __x,
|  | const list< _Tp, _Alloc > & | __y
| ) | `[inline]`

| Based on operator<. Definition at line 1220 of file stl_list.h.

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

| Based on operator<. Definition at line 1232 of file stl_list.h.

void std::swap | ( | list< _Tp, _Alloc > & | __x,
|  | list< _Tp, _Alloc > & | __y
| ) | `[inline]`

| See std::list::swap(). Definition at line 1238 of file stl_list.h. References list::swap().