[stack.ops]

# 23 Containers library [[containers]](./#containers)

## 23.6 Container adaptors [[container.adaptors]](container.adaptors#stack.ops)

### 23.6.6 Class template stack [[stack]](stack#ops)

#### 23.6.6.6 Operators [stack.ops]

[ð](#lib:operator==,stack)

`template<class T, class Container>
  constexpr bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16805)

*Returns*: x.c == y.c[.](#1.sentence-1)

[ð](#lib:operator!=,stack)

`template<class T, class Container>
  constexpr bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16817)

*Returns*: x.c != y.c[.](#2.sentence-1)

[ð](#lib:operator%3c,stack)

`template<class T, class Container>
  constexpr bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16829)

*Returns*: x.c < y.c[.](#3.sentence-1)

[ð](#lib:operator%3e,stack)

`template<class T, class Container>
  constexpr bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16841)

*Returns*: x.c > y.c[.](#4.sentence-1)

[ð](#lib:operator%3c=,stack)

`template<class T, class Container>
  constexpr bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16853)

*Returns*: x.c <= y.c[.](#5.sentence-1)

[ð](#lib:operator%3e=,stack)

`template<class T, class Container>
  constexpr bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16865)

*Returns*: x.c >= y.c[.](#6.sentence-1)

[ð](#lib:operator%3c=%3e,stack)

`template<class T, [three_way_comparable](cmp.concept#concept:three_way_comparable "17.12.4 Concept three_­way_­comparable [cmp.concept]") Container>
  constexpr compare_three_way_result_t<Container>
    operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
`

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16878)

*Returns*: x.c <=> y.c[.](#7.sentence-1)
