stack implementation with a simple push pop interface
More...
#include <iceoryx_hoofs/cxx/stack.hpp>
|
cxx::optional< T > | pop () noexcept |
| returns the last pushed element when the stack contains elements otherwise a cxx::nullopt
|
|
template<typename... Targs> |
bool | push (Targs &&... args) noexcept |
| pushed an element into the stack by forwarding all arguments to the constructor of T
|
|
uint64_t | size () const noexcept |
| returns the stack size
|
|
|
static constexpr uint64_t | capacity () noexcept |
| returns the stack capacity
|
|
template<typename T, uint64_t Capacity>
class iox::cxx::stack< T, Capacity >
stack implementation with a simple push pop interface
- Template Parameters
-
T | type which the stack contains |
Capacity | the capacity of the stack |
◆ push()
template<typename T , uint64_t Capacity>
template<typename... Targs>
pushed an element into the stack by forwarding all arguments to the constructor of T
- Parameters
-
[in] | args | arguments which will be perfectly forwarded to the constructor of T |
- Returns
- true if the push was successful, otherwise false
The documentation for this class was generated from the following file: