This class defines a container adapter which supports access primarily via push, pop, and top. This type can be based on a variety of other container types, including deque, vector, and list. This type is value‐semantic if the supporting CONTAINER and VALUE are value‐semantic.
Synopsis
Declared in <bslstl_stack.h>
template<
class VALUE,
class CONTAINER = deque<VALUE>>
class stack;
Description
Note that we never use VALUE in the implementation except in the default argument of CONTAINER. We use CONTAINER::value_type for everything, which means that if CONTAINER is specified, then VALUE is ignored.
Type Aliases
Name |
Description |
This |
|
This |
|
This |
|
This |
|
This |
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Push onto this stack a newly created |
|
Return |
|
Remove the top element from this stack. The behavior is undefined if this stack is empty. |
|
|
|
Push onto this stack the elements of the specified |
|
Return the number of elements contained in this stack. |
|
Exchange the value of this stack with the value of the specified |
|
|
|
Declare nested type traits for this type. |
Protected Data Members
Name |
Description |
The |
Deduction Guides
Name |
Description |
Deduce the template parameter |
|
Deduce the template parameters |
|
|
Deduce the template parameters |
Deduce the template parameters |
|
Deduce the template parameters |
|
Deduce the template parameter |
Friends
Name |
Description |
Same as the related overload above for |
|
Same as the related overload above for |
|
Return whether the specified stacks compare lexicographically; see the non‐member |
|
Return whether the specified stacks compare lexicographically; see the non‐member |
|
Return whether the specified stacks compare lexicographically; see the non‐member |
|
Same as the related overload above for |
|
Same as the related overload above for |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Return |
|
Same as the related overload above for |
|
Return |
|
Return |
|
Return |
|
Swap the value of the specified |
Created with MrDocs