13#include "../defines.h"
23template<
class T,
int N>
33 inline const T&
top()
const;
44 inline void push(
const T& value);
67template<
class T,
int N>
74template<
class T,
int N>
77 return STD_SAFE_AT(m_data,m_size-1);
80template<
class T,
int N>
83 return STD_SAFE_AT(m_data,m_size-1);
86template<
class T,
int N>
92template<
class T,
int N>
98template<
class T,
int N>
101 STD_SAFE_AT(m_data,m_size) = value;
105template<
class T,
int N>
111template<
class T,
int N>
117template<
class T,
int N>
Stack with fixed-size storage.
void clear()
Clear the stack content.
void pop()
Pop the last element of the Stack.
int size() const
Get the number of elements in the Stack.
std::array< T, N > m_data
Fixed-size data buffer.
T ValueType
Type of value stored in the Stack.
void push(const T &value)
Add an element on top of the stack.
void push()
Add an element with default initialization.
int m_size
Number of elements in the Stack.
T & top()
Write access to the top element of 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.