The standard explains the definition of iterator_category of common_iterator in [iterators.common#common.iter.types-1.2]: "iterator_category denotes forward_iterator_tag if the qualified-id iterator_traits<I>::iterator_category is valid and denotes a type that models derived_from<forward_iterator_tag>; otherwise it denotes input_iterator_tag."
However, the MSVC's implementation is as follows:
|
using iterator_category =
|
|
conditional_t<derived_from<_Iter_cat_t<_Iter>, forward_iterator_tag>, forward_iterator_tag, input_iterator_tag>;
|
This does not check the validity of iterator_traits<I>::iterator_category.
The standard explains the definition of
iterator_categoryofcommon_iteratorin [iterators.common#common.iter.types-1.2]: "iterator_categorydenotesforward_iterator_tagif the qualified-iditerator_traits<I>::iterator_categoryis valid and denotes a type that modelsderived_from<forward_iterator_tag>; otherwise it denotesinput_iterator_tag."However, the MSVC's implementation is as follows:
STL/stl/inc/iterator
Lines 1034 to 1035 in bd7adb4
This does not check the validity of
iterator_traits<I>::iterator_category.