6#ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
7#define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
37 const std::size_t _capacity;
53 return _impl._capacity;
58 return _impl._size == 0;
63 return _impl._size == _impl._capacity;
69 _impl._data[_impl._size++] = t;
81 return _impl._data[_impl._size-1];
87 return _impl._data[_impl._size-1];
93 return _impl._data[0];
99 return _impl._data[0];
104 assert(k < _impl._size);
105 return _impl._data[k];
110 assert(k < _impl._size);
111 return _impl._data[k];
120 template<
typename T, std::
size_t capacity>
122 :
private std::array<T,capacity>
134 using view_base::operator[];
Definition accumulate_static.hh:16
Definition fixedcapacitystack.hh:22
bool empty() const
Definition fixedcapacitystack.hh:56
bool full() const
Definition fixedcapacitystack.hh:61
T & operator[](std::size_t k)
Definition fixedcapacitystack.hh:102
void pop_back()
Definition fixedcapacitystack.hh:72
T & back()
Definition fixedcapacitystack.hh:78
std::size_t capacity() const
Definition fixedcapacitystack.hh:51
T & front()
Definition fixedcapacitystack.hh:90
const T & front() const
Definition fixedcapacitystack.hh:96
const T & operator[](std::size_t k) const
Definition fixedcapacitystack.hh:108
void push_back(const T &t)
Definition fixedcapacitystack.hh:66
const T & back() const
Definition fixedcapacitystack.hh:84
std::size_t size() const
Definition fixedcapacitystack.hh:46
FixedCapacityStackView(Impl &impl)
Definition fixedcapacitystack.hh:40
Definition fixedcapacitystack.hh:125
FixedCapacityStack()
Definition fixedcapacitystack.hh:136