You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new C++20 iterator concepts use common_reference to constrain the value, reference, and rvalue_reference associated types in order to support proxy references (see [iterator.concept.readable]).
However, the C++17 iterators did not support proxy references, so the use of common_reference in [iterator.traits]/p2 is needlessly complex. The common_reference constraints can be replaced with simple convertibility requirements to a const lvalue reference to the value type.
The new C++20 iterator concepts use common_reference to constrain the value, reference, and rvalue_reference associated types in order to support proxy references (see [iterator.concept.readable]).
However, the C++17 iterators did not support proxy references, so the use of common_reference in [iterator.traits]/p2 is needlessly complex. The common_reference constraints can be replaced with simple convertibility requirements to a const lvalue reference to the value type.
Proposed Resolution
Change [iterator.traits]/p2 as follows:
The text was updated successfully, but these errors were encountered: