|
STL Memory Versioning
|
A versioned mimic of a stl::stack, suitable for multithread. More...
#include <vs_stack.h>
Public Types | |
| typedef Versioned< std::stack< _Key >, _Strategy > | _Versioned |
| typedef std::stack< _Key >::size_type | size_type |
Public Member Functions | |
| vs_stack () | |
| Creates a vs_stack with no elements. More... | |
| vs_stack (std::initializer_list< _Key > __l) | |
| Builds a vs_stack from an initializer_list. More... | |
| vs_stack (const vs_stack &__vs_stack) | |
| vs_stack copy constructor More... | |
| const _Key & | top () const |
| access top element More... | |
| size_type | size () const noexcept |
| size of underlying stack More... | |
| void | push (const _Key &__x) |
| Attempts to push an element into the stack. More... | |
| void | pop () |
| Remove first element of stack. More... | |
A versioned mimic of a stl::stack, suitable for multithread.
| _Key | Type of key objects. |
| _Strategy | Custom strategy class for different merge behaviour |
Definition at line 26 of file vs_stack.h.
| typedef Versioned<std::stack<_Key>,_Strategy> vs::vs_stack< _Key, _Strategy >::_Versioned |
Definition at line 35 of file vs_stack.h.
| typedef std::stack<_Key>::size_type vs::vs_stack< _Key, _Strategy >::size_type |
Definition at line 36 of file vs_stack.h.
|
inlineexplicit |
Creates a vs_stack with no elements.
Definition at line 49 of file vs_stack.h.
|
inline |
Builds a vs_stack from an initializer_list.
| __l | An initializer_list. |
| __comp | Comparator to use. |
Copy elements of the list to created vs_stack. Non-standard, but handy to have instead of copying with stack{{initilizer}}
Definition at line 60 of file vs_stack.h.
|
inline |
vs_stack copy constructor
does not inherit versions history
Definition at line 77 of file vs_stack.h.
|
inline |
Remove first element of stack.
Definition at line 119 of file vs_stack.h.
|
inline |
Attempts to push an element into the stack.
| __x | Element to be inserted. |
Definition at line 110 of file vs_stack.h.
|
inlinenoexcept |
|
inline |
access top element
Returns a read-only (constant) reference that points to the first element in the vs_stack.
Definition at line 93 of file vs_stack.h.