STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Attributes | List of all members
stack< _Ty, _Container > Class Template Reference

Public Types

typedef stack< _Ty, _Container > _Myt
 
typedef _Container container_type
 
typedef _Container::value_type value_type
 
typedef _Container::size_type size_type
 
typedef _Container::reference reference
 
typedef _Container::const_reference const_reference
 

Public Member Functions

 stack ()
 
 stack (const _Myt &_Right)
 
 stack (const _Container &_Cont)
 
_Mytoperator= (const _Myt &_Right)
 
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
 stack (const _Alloc &_Al)
 
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
 stack (const _Myt &_Right, const _Alloc &_Al)
 
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
 stack (const _Container &_Cont, const _Alloc &_Al)
 
 stack (_Myt &&_Right) _NOEXCEPT_OP(is_nothrow_move_constructible< _Container >
 
 stack (_Container &&_Cont)
 
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
 stack (_Myt &&_Right, const _Alloc &_Al)
 
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
 stack (_Container &&_Cont, const _Alloc &_Al)
 
_Mytoperator= (_Myt &&_Right) _NOEXCEPT_OP(is_nothrow_move_assignable< _Container >
 
void push (value_type &&_Val)
 
template<class... _Valty>
void emplace (_Valty &&..._Val)
 
bool empty () const
 
size_type size () const
 
reference top ()
 
const_reference top () const
 
void push (const value_type &_Val)
 
void pop ()
 
const _Container & _Get_container () const
 
void swap (_Myt &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Container >
 

Protected Attributes

_Container c
 

Member Typedef Documentation

template<class _Ty, class _Container = deque<_Ty>>
typedef stack<_Ty, _Container> stack< _Ty, _Container >::_Myt
template<class _Ty, class _Container = deque<_Ty>>
typedef _Container::const_reference stack< _Ty, _Container >::const_reference
template<class _Ty, class _Container = deque<_Ty>>
typedef _Container stack< _Ty, _Container >::container_type
template<class _Ty, class _Container = deque<_Ty>>
typedef _Container::reference stack< _Ty, _Container >::reference
template<class _Ty, class _Container = deque<_Ty>>
typedef _Container::size_type stack< _Ty, _Container >::size_type
template<class _Ty, class _Container = deque<_Ty>>
typedef _Container::value_type stack< _Ty, _Container >::value_type

Constructor & Destructor Documentation

template<class _Ty, class _Container = deque<_Ty>>
stack< _Ty, _Container >::stack ( )
inline
27  : c()
28  { // construct with empty container
29  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
stack< _Ty, _Container >::stack ( const _Myt _Right)
inline
32  : c(_Right.c)
33  { // construct by copying _Right
34  }
_Container c
Definition: stack:154
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
stack< _Ty, _Container >::stack ( const _Container &  _Cont)
inlineexplicit
37  : c(_Cont)
38  { // construct by copying specified container
39  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
stack< _Ty, _Container >::stack ( const _Alloc &  _Al)
inlineexplicit
52  : c(_Al)
53  { // construct with allocator
54  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
stack< _Ty, _Container >::stack ( const _Myt _Right,
const _Alloc &  _Al 
)
inline
60  : c(_Right.c, _Al)
61  { // construct by copying specified container
62  }
_Container c
Definition: stack:154
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
stack< _Ty, _Container >::stack ( const _Container &  _Cont,
const _Alloc &  _Al 
)
inline
68  : c(_Cont, _Al)
69  { // construct by copying specified container
70  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
stack< _Ty, _Container >::stack ( _Myt &&  _Right)
inline
74  : c(_STD move(_Right.c))
75  { // construct by moving _Right
76  }
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
stack< _Ty, _Container >::stack ( _Container &&  _Cont)
inlineexplicit
79  : c(_STD move(_Cont))
80  { // construct by moving specified container
81  }
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _Ty, class _Container = deque<_Ty>>
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
stack< _Ty, _Container >::stack ( _Myt &&  _Right,
const _Alloc &  _Al 
)
inline
87  : c(_STD move(_Right.c), _Al)
88  { // construct by moving specified container
89  }
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
template<class _Alloc , class = typename enable_if<uses_allocator<_Container, _Alloc>::value, void>::type>
stack< _Ty, _Container >::stack ( _Container &&  _Cont,
const _Alloc &  _Al 
)
inline
95  : c(_STD move(_Cont), _Al)
96  { // construct by moving specified container
97  }
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290

Member Function Documentation

template<class _Ty, class _Container = deque<_Ty>>
const _Container& stack< _Ty, _Container >::_Get_container ( ) const
inline
149  { // get reference to container
150  return (c);
151  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
template<class... _Valty>
void stack< _Ty, _Container >::emplace ( _Valty &&...  _Val)
inline
113  { // insert element at beginning
114  c.emplace_back(_STD forward<_Valty>(_Val)...);
115  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
bool stack< _Ty, _Container >::empty ( ) const
inline
119  { // test if stack is empty
120  return (c.empty());
121  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
_Myt& stack< _Ty, _Container >::operator= ( const _Myt _Right)
inline
42  { // assign by copying _Right
43  c = _Right.c;
44  return (*this);
45  }
_Container c
Definition: stack:154
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
_Myt& stack< _Ty, _Container >::operator= ( _Myt &&  _Right)
inline
101  { // assign by moving _Right
102  c = _STD move(_Right.c);
103  return (*this);
104  }
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
void stack< _Ty, _Container >::pop ( )
inline
144  { // erase last element
145  c.pop_back();
146  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
void stack< _Ty, _Container >::push ( value_type &&  _Val)
inline
107  { // insert element at beginning
108  c.push_back(_STD move(_Val));
109  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Container c
Definition: stack:154
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _Ty, class _Container = deque<_Ty>>
void stack< _Ty, _Container >::push ( const value_type _Val)
inline
139  { // insert element at end
140  c.push_back(_Val);
141  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
size_type stack< _Ty, _Container >::size ( ) const
inline
124  { // test length of stack
125  return (c.size());
126  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
void stack< _Ty, _Container >::swap ( _Myt _Right)
inline
159  { // exchange contents with _Right
160  _Swap_adl(c, _Right.c);
161  }
_Container c
Definition: stack:154
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:56
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Container = deque<_Ty>>
reference stack< _Ty, _Container >::top ( )
inline
129  { // return last element of mutable stack
130  return (c.back());
131  }
_Container c
Definition: stack:154
template<class _Ty, class _Container = deque<_Ty>>
const_reference stack< _Ty, _Container >::top ( ) const
inline
134  { // return last element of nonmutable stack
135  return (c.back());
136  }
_Container c
Definition: stack:154

Member Data Documentation

template<class _Ty, class _Container = deque<_Ty>>
_Container stack< _Ty, _Container >::c
protected

The documentation for this class was generated from the following file: