13#include "../defines.h"
24 template <
class T,
int N>
31 PONCA_MULTIARCH
inline Stack();
34 PONCA_MULTIARCH
inline const T&
top()
const;
36 PONCA_MULTIARCH
inline T&
top();
39 PONCA_MULTIARCH
inline bool empty()
const;
41 PONCA_MULTIARCH
inline int size()
const;
45 PONCA_MULTIARCH
inline void push(
const T&
value);
48 PONCA_MULTIARCH
inline void push();
52 PONCA_MULTIARCH
inline void pop();
55 PONCA_MULTIARCH
inline void clear();
Aggregator class used to declare specialized structures using CRTP.
Stack with fixed-size storage.
void clear()
Clear the stack content.
std::array< T, N > m_data
Fixed-size data buffer.
void pop()
Pop the last element of the Stack.
int size() const
Get the number of elements in the Stack.
T ValueType
Type of value stored in the Stack.
void push()
Add an element with default initialization.
int m_size
Number of elements in the Stack.
bool empty() const
Is the stack empty.
const T & top() const
Read access to the top element of the Stack.
This Source Code Form is subject to the terms of the Mozilla Public License, v.