6#include "Stroika/Foundation/Common/Concepts.h"
8#include "Stroika/Foundation/Containers/Private/IterableUtils.h"
20 :
inherited{Factory::Stack_Factory<T>::Default () ()}
22 _AssertRepValidType ();
24#if qCompilerAndStdLib_RequiresNotMatchInlineOutOfLineForTemplateClassBeingDefined_Buggy
26 template <
typename ITERABLE_OF_ADDABLE, enable_if_t<IIterableOfTo<ITERABLE_OF_ADDABLE, T> and not derived_from<remove_cvref_t<ITERABLE_OF_ADDABLE>, Stack<T>>>*>
28 :
Stack{begin (src), end (src)}
33 template <IIterableOfTo<T> ITERABLE_OF_ADDABLE>
35 requires (not derived_from<remove_cvref_t<ITERABLE_OF_ADDABLE>, Stack<T>>)
36 : Stack{begin (src), end (src)}
44 _AssertRepValidType ();
50 _AssertRepValidType ();
53 template <IInputIterator<T> ITERATOR_OF_ADDABLE>
54 inline Stack<T>::Stack (ITERATOR_OF_ADDABLE&& start, ITERATOR_OF_ADDABLE&& end)
55 : inherited{Factory::Stack_Factory<T>::
Default () (forward<ITERATOR_OF_ADDABLE> (start), forward<ITERATOR_OF_ADDABLE> (end))}
61 _SafeReadWriteRepAccessor<_IRep>{
this}._GetWriteableRep ().Push (item);
66 return _SafeReadWriteRepAccessor<_IRep>{
this}._GetWriteableRep ().Pop ();
71 return _SafeReadRepAccessor<_IRep>{
this}._ConstGetRep ().Top ();
76 _SafeReadRepAccessor<_IRep> tmp{
this};
77 if (not tmp._ConstGetRep ().empty ()) {
78 this->_fRep = tmp._ConstGetRep ().CloneEmpty ();
90 _SafeReadRepAccessor<_IRep> ignored{
this};
95 requires (equality_comparable<T>)
101 requires (three_way_comparable<T>)
103 return ThreeWayComparer<>{}(*
this, rhs);
#define qStroika_Foundation_Debug_AssertionsChecked
The qStroika_Foundation_Debug_AssertionsChecked flag determines if assertions are checked and validat...
#define RequireExpression(c)
typename Iterable< T >::template SequentialEqualsComparer< T_EQUALS_COMPARER > EqualsComparer
simply indirect to @Iterable<T>::SequentialEqualsComparer
nonvirtual bool operator==(const Stack &rhs) const
typename inherited::value_type value_type
nonvirtual value_type Pop()
nonvirtual auto operator<=>(const Stack &rhs) const
nonvirtual void RemoveAll()
nonvirtual void Push(ArgByValueType< value_type > item)
nonvirtual void clear()
STL-ish alias for RemoveAll ().
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.