|
Celeritas 0.7.0-dev.194+develop.0df4cab59
|
Helper class that provides the functionality of a stack on an underlying container. More...
#include <MiniStack.hh>
Public Types | |
| using | size_type = ::celeritas::size_type |
| using | value_type = T |
Public Member Functions | |
| CELER_FUNCTION | MiniStack (Span< T > storage) |
| Construct with underlying storage. | |
| CELER_FUNCTION void | push (T element) |
| Insert a new element at the top of the stack. | |
| CELER_FUNCTION T | pop () |
| Remove and return the top element of the stack. | |
| CELER_FORCEINLINE_FUNCTION bool | empty () const |
| Whether there are any elements in the container. | |
| CELER_FORCEINLINE_FUNCTION size_type | size () const |
| Get the number of elements. | |
| CELER_FORCEINLINE_FUNCTION size_type | capacity () const |
| Get the number of elements that can fit in the allocated storage. | |
Helper class that provides the functionality of a stack on an underlying container.