Proposal in n3351 The design concept for STL is to continue using iterator category tags:
concept InputIterator<WeakInputIterator I> = EqualityComparable<I> && Derived<IteratorCategory<I>, input_iterator_tag>;
In the syntax expected to be included in the standard for n4377, the C ++ Extensions for Concepts :
template<typename I> concept bool InputIterator = WeakInputIterator<I>() && EqualityComparable<I>() && Derived<IteratorCategory<I>, input_iterator_tag>();
From the previous document:
While C ++ 11 does this, it is possible to evaluate all static requirements [...], we still need to differentiate some concepts based on their semantic requirements. The iterator category solves this problem for us.
In general, semantic requirements can be expressed by checking a type predicate (for example, a nested type or a constant or type function) that exists solely for the purpose of runtime semantics.
source share