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[];
Definition: accumulate_static.hh:13
Definition: fixedcapacitystack.hh:20
bool empty() const
Definition: fixedcapacitystack.hh:54
bool full() const
Definition: fixedcapacitystack.hh:59
void pop_back()
Definition: fixedcapacitystack.hh:70
T & operator[](std::size_t k)
Definition: fixedcapacitystack.hh:100
std::size_t capacity() const
Definition: fixedcapacitystack.hh:49
T & front()
Definition: fixedcapacitystack.hh:88
void push_back(const T &t)
Definition: fixedcapacitystack.hh:64
const T & operator[](std::size_t k) const
Definition: fixedcapacitystack.hh:106
std::size_t size() const
Definition: fixedcapacitystack.hh:44
FixedCapacityStackView(Impl &impl)
Definition: fixedcapacitystack.hh:38
T & back()
Definition: fixedcapacitystack.hh:76
Definition: fixedcapacitystack.hh:123
FixedCapacityStack()
Definition: fixedcapacitystack.hh:134