Definition of ITER_CONCEPT(I)

ITER_CONCEPT(I) is defined in https://en.cppreference.com/w/cpp/iterator/random_access_iterator

But I have the following doubts?


Definition of this concept is specified via an exposition-only alias template /*ITER_CONCEPT*/.

In order to determine /*ITER_CONCEPT*/<I>, let ITER_TRAITS<I> denote I if the specialization std::iterator_traits<I> is generated from the primary template, or std::iterator_traits<I> otherwise:

If ITER_TRAITS<I>::iterator_concept is valid and names a type, /*ITER_CONCEPT*/<I> denotes the type.
Otherwise, if ITER_TRAITS<I>::iterator_category is valid and names a type, /*ITER_CONCEPT*/<I> denotes the type.
Otherwise, if std::iterator_traits<I> is generated from the primary template, /*ITER_CONCEPT*/<I> denotes std::random_access_iterator_tag.
Otherwise, /*ITER_CONCEPT*/<I> does not denote a type and results in a substitution failure.


1- specified via an exposition-only == ??
2- specialization std::iterator_traits<I> is generated from the primary template --- how do we find this?

Thanks!
Juan
Topic archived. No new replies allowed.