4#ifndef _Stroika_Foundation_Traversal_BidirectionalIterator_h_
5#define _Stroika_Foundation_Traversal_BidirectionalIterator_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
19namespace Stroika::Foundation::Traversal {
33 template <
typename T,
typename ITERATOR_TRAITS = Support::DefaultIteratorTraits<T>>
90 nonvirtual
bool AtStart () const;
142 template <typename T, typename ITERATOR_TRAITS>
168 static_assert (bidirectional_iterator<BidirectionalIterator<int>>);
169 static_assert (regular<BidirectionalIterator<int>>);
170 static_assert (sentinel_for<default_sentinel_t, BidirectionalIterator<int>>);
181#include "BidirectionalIterator.inl"
An Iterator<T> that also supports going backwards.
virtual bool AtStart() const =0
return true iff the iterator is at the start of its range. You can only backup further if NOT AtStart...
virtual T Back()=0
Move iterator one position back, closer to start. Return the current value of T (which must always be...
A BidirectionalIterator is an Iterator that can be moved both forward and backward.
nonvirtual const IRep & ConstGetRep() const
Get a reference to the IRep owned by the iterator. This is an implementation detail,...
nonvirtual IRep & GetRep()
Get a reference to the IRep owned by the iterator. This is an implementation detail,...
bidirectional_iterator_tag iterator_category
Implementation detail for iterator implementors.
An Iterator<T> is a copyable object which allows traversing the contents of some container.
typename ITERATOR_TRAITS::difference_type difference_type
difference_type = typename ITERATOR_TRAITS::difference_type;
typename ITERATOR_TRAITS::pointer pointer
pointer = typename ITERATOR_TRAITS::pointer;
typename ITERATOR_TRAITS::value_type value_type
value_type = typename ITERATOR_TRAITS::value_type;
typename ITERATOR_TRAITS::reference reference
reference = typename ITERATOR_TRAITS::reference;