LIFO stack adapter over a container of VALUE elements.
Synopsis
Declared in <bslstl_stack.h>
template<
class VALUE,
class CONTAINER = deque<VALUE>>
class stack;
Description
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.
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 |
|
Emplace a newly constructed |
|
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 |
Return the three‐way comparison of the specified stacks; 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 |
|
Return whether the specified stacks compare lexicographically; see the non‐member |
|
Return whether the specified stacks compare lexicographically; see the non‐member |
|
Return whether two stacks have different values. |
|
Return whether the specified stacks have the same value; see the non‐member |
Non-Member Functions
Name |
Description |
Return whether the operands do not have the same value. |
|
Return whether |
|
Return whether |
|
Return the three‐way comparison result of the specified |
|
Return whether the operands have the same value. |
|
Return whether |
|
Return whether |
|
Swap the value of the specified |
Created with MrDocs