Go to the documentation of this file.
4 #ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
5 #define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
35 const std::size_t _capacity;
51 return _impl._capacity;
56 return _impl._size == 0;
61 return _impl._size == _impl._capacity;
67 _impl._data[_impl._size++] = t;
79 return _impl._data[_impl._size-1];
85 return _impl._data[_impl._size-1];
91 return _impl._data[0];
97 return _impl._data[0];
102 assert(k < _impl._size);
103 return _impl._data[k];
108 assert(k < _impl._size);
109 return _impl._data[k];
118 template<
typename T, std::
size_t capacity>
120 :
private std::array<T,capacity>
132 using view_base::operator[];
151 #endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
Definition: fixedcapacitystack.hh:19
void push_back(const T &t)
Definition: fixedcapacitystack.hh:64
bool full() const
Definition: fixedcapacitystack.hh:59
T & front()
Definition: fixedcapacitystack.hh:88
Definition: fixedcapacitystack.hh:119
void pop_back()
Definition: fixedcapacitystack.hh:70
FixedCapacityStackView(Impl &impl)
Definition: fixedcapacitystack.hh:38
const T & front() const
Definition: fixedcapacitystack.hh:94
std::size_t size() const
Definition: fixedcapacitystack.hh:44
FixedCapacityStack()
Definition: fixedcapacitystack.hh:134
T & back()
Definition: fixedcapacitystack.hh:76
T & operator[](std::size_t k)
Definition: fixedcapacitystack.hh:100
const T & back() const
Definition: fixedcapacitystack.hh:82
bool empty() const
Definition: fixedcapacitystack.hh:54
Definition: accumulate_static.hh:13
const T & operator[](std::size_t k) const
Definition: fixedcapacitystack.hh:106
std::size_t capacity() const
Definition: fixedcapacitystack.hh:49