CXXIter 0.2
Loading...
Searching...
No Matches
CXXIter::concepts::DoubleEndedSourceContainer Concept Reference

Concept that checks whether the given TContainer supports double-ended iteration when using CXXIter's standard source classes CXXIter::SrcMov, CXXIter::SrcRef and CXXIter::SrcCRef. More...

#include <Concepts.h>

Concept definition

template<typename TContainer>
TContainer& container,
const TContainer& constContainer,
typename trait::Source<TContainer>::IteratorState& iterState,
typename trait::Source<TContainer>::ConstIteratorState& constIterState,
size_t n
) {
{trait::Source<TContainer>::nextBack(container, iterState)} -> std::same_as<typename trait::Source<TContainer>::ItemRef>;
{trait::Source<TContainer>::nextBack(constContainer, constIterState)} -> std::same_as<typename trait::Source<TContainer>::ItemConstRef>;
{trait::Source<TContainer>::skipNBack(container, iterState, n)} -> std::same_as<size_t>;
{trait::Source<TContainer>::skipNBack(container, constIterState, n)} -> std::same_as<size_t>;
}
Concept that checks whether the given TContainer supports double-ended iteration when using CXXIter's...
Definition: Concepts.h:54
Concept that checks whether the given TContainer is supported by CXXIter's standard source classes CX...
Definition: Concepts.h:16
static constexpr ItemRef nextBack(TContainer &container, IteratorState &iter)
Return the next item from the back of the iteration with the given iter state on the given container.
Definition: Traits.h:274
static constexpr size_t skipNBack(const TContainer &container, IteratorState &iter, size_t n)
Skip the next n elements from the back of this iterator.
Definition: Traits.h:293

Detailed Description

Concept that checks whether the given TContainer supports double-ended iteration when using CXXIter's standard source classes CXXIter::SrcMov, CXXIter::SrcRef and CXXIter::SrcCRef.

The concept does these checks by testing whether the optional double-ended part in CXXIter::trait::Source was properly provided by the specialization for the given TContainer type.

See also
CXXIter::Source for further details on this.

Definition at line 54 of file Concepts.h.