This is not conformant, as C++20 dictates that iterator_traits<T>::iterator_concept should be used whenever present (with a fallback to iterator_category when iterator_concept is absent); as in http://eel.is/c++draft/iterator.concept.forward#1
This is to allow defining iterators that have different category in C++17 than in C++20; like zip_iterator, which is an input iterator in C++17, but a random-access iterator in C++20 Ranges.
Iterator concepts in this library use
iterator_traits<T>::iterator_category
in the constraints, as in https://github.com/CaseyCarter/cmcstl2/blob/master/include/stl2/detail/iterator/concepts.hpp#L469This is not conformant, as C++20 dictates that
iterator_traits<T>::iterator_concept
should be used whenever present (with a fallback toiterator_category
wheniterator_concept
is absent); as in http://eel.is/c++draft/iterator.concept.forward#1This is to allow defining iterators that have different category in C++17 than in C++20; like
zip_iterator
, which is an input iterator in C++17, but a random-access iterator in C++20 Ranges.