Standard library header <stack>
From cppreference.com
This header is part of the containers library.
Includes | |
(C++20) |
Three-way comparison operator support |
(C++11) |
std::initializer_list class template |
Classes | |
| adapts a container to provide stack (LIFO data structure) (class template) | |
| specializes the std::uses_allocator type trait (class template specialization) | |
Functions | |
lexicographically compares the values of two stacks (function template) | |
(C++11) |
specializes the std::swap algorithm (function template) |
Synopsis
#include <compare>
#include <initializer_list>
namespace std {
// class template stack
template<class T, class Container = deque<T>>
class stack;
template<class T, class Container>
bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator<(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator>(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator>=(const stack<T, Container>& x, const stack