Lines Matching full:stack

14     stack synopsis
20 class stack
33 stack() = default;
34 ~stack() = default;
36 stack(const stack& q) = default;
37 stack(stack&& q) = default;
39 stack& operator=(const stack& q) = default;
40 stack& operator=(stack&& q) = default;
42 explicit stack(const container_type& c);
43 explicit stack(container_type&& c);
44 template <class InputIterator> stack(InputIterator first, InputIterator last); // since C++23
45 template<container-compatible-range<T> R> stack(from_range_t, R&& rg); // since C++23
46 template <class Alloc> explicit stack(const Alloc& a);
47 template <class Alloc> stack(const container_type& c, const Alloc& a);
48 template <class Alloc> stack(container_type&& c, const Alloc& a);
49 template <class Alloc> stack(const stack& c, const Alloc& a);
50 template <class Alloc> stack(stack&& c, const Alloc& a);
52 stack(InputIterator first, InputIterator last, const Alloc&); // since C++23
54 stack(from_range_t, R&& rg, const Alloc&); // since C++23
68 void swap(stack& c) noexcept(is_nothrow_swappable_v<Container>)
72 stack(Container) -> stack<typename Container::value_type, Container>; // C++17
75 stack(InputIterator, InputIterator) -> stack<iter-value-type<InputIterator>>; // since C++23
78 stack(from_range_t, R&&) -> stack<ranges::range_value_t<R>>; // since C++23
81 stack(Container, Allocator) -> stack<typename Container::value_type, Container>; // C++17
84 stack(InputIterator, InputIterator, Allocator)
85 -> stack<iter-value-type<InputIterator>,
89 stack(from_range_t, R&&, Allocator)
90 -> stack<ranges::range_value_t<R>, deque<ranges::range_value_t<R>, Allocator>>; // since C++23
93 bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
95 bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
97 bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
99 bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
101 bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
103 bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
106 operator<=>(const stack<T, Container>& x, const stack<T, Container>& y); // since C++20
109 void swap(stack<T, Container>& x, stack<T, Container>& y)
117 # include <__cxx03/stack>
121 # include <__fwd/stack.h>
136 // [stack.syn]
150 _LIBCPP_HIDE_FROM_ABI bool operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
153 _LIBCPP_HIDE_FROM_ABI bool operator<(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
156 class _LIBCPP_TEMPLATE_VIS stack {
169 _LIBCPP_HIDE_FROM_ABI stack() _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value) : c() {}
171 _LIBCPP_HIDE_FROM_ABI stack(const stack& __q) : c(__q.c) {}
173 _LIBCPP_HIDE_FROM_ABI stack& operator=(const stack& __q) {
179 _LIBCPP_HIDE_FROM_ABI stack(stack&& __q) noexcept(is_nothrow_move_constructible<container_type>::value)
182 _LIBCPP_HIDE_FROM_ABI stack& operator=(stack&& __q) noexcept(is_nothrow_move_assignable<container_type>::value) {
187 _LIBCPP_HIDE_FROM_ABI explicit stack(container_type&& __c) : c(std::move(__c)) {}
190 _LIBCPP_HIDE_FROM_ABI explicit stack(const container_type& __c) : c(__c) {}
193 _LIBCPP_HIDE_FROM_ABI explicit stack(const _Alloc& __a,
198 stack(const container_type& __c, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
202 stack(const stack& __s, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
207 stack(container_type&& __c, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
211 stack(stack&& __s, const _Alloc& __a, __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
217 _LIBCPP_HIDE_FROM_ABI stack(_InputIterator __first, _InputIterator __last) : c(__first, __last) {}
220 _LIBCPP_HIDE_FROM_ABI stack(from_range_t, _Range&& __range) : c(from_range, std::forward<_Range>(__range)) {}
226 _LIBCPP_HIDE_FROM_ABI stack(_InputIterator __first, _InputIterator __last, const _Alloc& __alloc)
232 _LIBCPP_HIDE_FROM_ABI stack(from_range_t, _Range&& __range, const _Alloc& __alloc)
274 _LIBCPP_HIDE_FROM_ABI void swap(stack& __s) _NOEXCEPT_(__is_nothrow_swappable_v<container_type>) {
282 friend bool operator==(const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
285 friend bool operator<(const stack<_T1, _OtherContainer>& __x, const stack<_T1, _OtherContainer>& __y);
290 stack(_Container) -> stack<typename _Container::value_type, _Container>;
296 stack(_Container, _Alloc) -> stack<typename _Container::value_type, _Container>;
301 stack(_InputIterator, _InputIterator) -> stack<__iter_value_type<_InputIterator>>;
304 stack(from_range_t, _Range&&) -> stack<ranges::range_value_t<_Range>>;
310 stack(_InputIterator,
312 _Alloc) -> stack<__iter_value_type<_InputIterator>, deque<__iter_value_type<_InputIterator>, _Alloc>>;
315 stack(from_range_t,
317 _Alloc) -> stack<ranges::range_value_t<_Range>, deque<ranges::range_value_t<_Range>, _Alloc>>;
322 inline _LIBCPP_HIDE_FROM_ABI bool operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
327 inline _LIBCPP_HIDE_FROM_ABI bool operator<(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
332 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
337 inline _LIBCPP_HIDE_FROM_ABI bool operator>(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
342 inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
347 inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
355 operator<=>(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
363 inline _LIBCPP_HIDE_FROM_ABI void swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
369 struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {