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>
131 using view_base::size;
132 using view_base::operator[];
151 #endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH bool empty() const
Definition: fixedcapacitystack.hh:54
const T & back() const
Definition: fixedcapacitystack.hh:82
auto front(const HybridTreePath< T... > &tp) -> decltype(treePathEntry< 0 >(tp))
Returns a copy of the first element of the HybridTreePath.
Definition: treepath.hh:452
FixedCapacityStack()
Definition: fixedcapacitystack.hh:134
Definition: fixedcapacitystack.hh:119
Definition: accumulate_static.hh:13
const T & operator[](std::size_t k) const
Definition: fixedcapacitystack.hh:106
T & operator[](std::size_t k)
Definition: fixedcapacitystack.hh:100
T & back()
Definition: fixedcapacitystack.hh:76
T & front()
Definition: fixedcapacitystack.hh:88
void push_back(const T &t)
Definition: fixedcapacitystack.hh:64
const T & front() const
Definition: fixedcapacitystack.hh:94
std::size_t capacity() const
Definition: fixedcapacitystack.hh:49
std::size_t size() const
Definition: fixedcapacitystack.hh:44
Definition: fixedcapacitystack.hh:19
bool full() const
Definition: fixedcapacitystack.hh:59
FixedCapacityStackView(Impl &impl)
Definition: fixedcapacitystack.hh:38
void pop_back()
Definition: fixedcapacitystack.hh:70
auto back(const HybridTreePath< T... > &tp) -> decltype(treePathEntry< sizeof...(T) -1 >(tp))
Returns a copy of the last element of the HybridTreePath.
Definition: treepath.hh:439