55 #ifndef LIB_ITER_STACK_H 56 #define LIB_ITER_STACK_H 88 return not this->empty();
94 REQUIRE (not this->empty());
95 return unConst(
this)->back();
101 REQUIRE (not this->empty());
131 this->stateCore().push_back (elm);
138 this->stateCore().emplace_back (std::move (elm));
143 insert (TY
const& elm)
152 this->__throw_if_empty();
153 TY topElement (std::move (this->stateCore().back()));
154 this->stateCore().pop_back();
161 this->stateCore().clear();
170 return unConst(
this)->stateCore().size();
206 this->stateCore().push_front (elm);
213 this->stateCore().emplace_front (std::move (elm));
218 insert (TY
const& elm)
226 this->__throw_if_empty();
227 TY firstElement (std::move (this->stateCore().back()));
228 this->stateCore().pop_back();
238 return unConst(
this)->stateCore().size();
257 : queue_(initialElements)
261 template<
typename IT>
263 usingSequence (IT src)
271 wrapping (TY
const& elm)
293 return Builder(initial);
315 elements (T
const& e0, T
const& e1, T
const& e2)
322 elements (T
const& e0, T
const& e1, T
const& e2, T
const& e3)
324 return IterQueue<T>().feed(e0).feed(e1).feed(e2).feed(e3);
329 elements (T
const& e0, T
const& e1, T
const& e2, T
const& e3, T
const& e4)
331 return IterQueue<T>().feed(e0).feed(e1).feed(e2).feed(e3).feed(e4);
IterQueue< T > elements(T const &elm)
convenience free function to build an iterable sequence
A Stack which can be popped by iterating.
Helper template(s) for creating Lumiera Forward Iterators.
Implementation namespace for support and library code.
A Queue which can be pulled by iterating.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Another Lumiera Forward Iterator building block, based on incorporating a state type right into the i...
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Types marked with this mix-in may be created by copy-construction (or move construction), but may be not reassigned thereafter.
Lumiera error handling (C++ interface).
friend IterQueue::Builder build(IterQueue &initial)
Extension point to be picked up by ADL.
Wrapper to mark a std::deque instance for use as "state core" within lib::IterStateWrapper.
Adapter for use as opaque sequence.