This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Concepts status.
Section: 25.3.2.3 [iterator.traits] Status: NAD Concepts Submitter: Alisdair Meredith Opened: 2009-05-28 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [iterator.traits].
View all issues with NAD Concepts status.
Discussion:
The deprecated support for iterator_traits and legacy (unconstrained) iterators features the (exposition only) concept:
concept IsReference<typename T> { } // exposition only template<typename T> concept_map IsReference<T&> { }
Now this looks exactly like the LvalueReference concept recently added to clause 20, so I wonder if we should use that instead? Then I consider the lack of rvalue-reference support, which means that move_iterator would always flag as merely supporting the input_iterator_tag category. This suggests we retain the exposition concept, but add a second concept_map to support rvalue references.
I would suggest adding the extra concept_map is the right way forward, but still wonder if the two exposition-only concepts in this clause might be worth promoting to clause 20. That question might better be answered with a fuller investigation of type_trait/concept unification though.
Proposed resolution:
In Iterator traits 25.3.2.3 [iterator.traits] para 4 add:
concept IsReference<typename T> { } // exposition only template<typename T> concept_map IsReference<T&> { } template<typename T> concept_map IsReference<T&&> { }