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 term constexpr iterator is defined in [iterator.requirements.general] as follows:
-16- Iterators are called constexpr iterators if all operations provided to meet iterator category
requirements are constexpr functions.
[Note 3: For example, the types "pointer to int" and reverse_iterator<int*> are constexpr iterators. - end note]
The particular form of this definition using the term "called" is untypical for introducing a requirement and has let to the interpretation in the proposed wording of LWG 4038 that when we require a type to meet the requirement of a constexpr iterator we should impose an "is a constexpr iterator" requirement.
This deviates from all existing places where we impose the form "meets the constexpr iterator requirements" instead ([string.view.iterators] p1, [basic.string.general] p5, [container.opt.reqmts] p1, [array.overview] p5, [vector.overview] p3).
Note that the term "meets the XX requirements" is not restricted to the Cpp17YY requirements, we use it elsewhere too, e.g. when we say that a type meets the character traits requirements ([char.traits]), the allocator-aware container requirements ([container.alloc.reqmts), or the layout mappings requirements ([mdspan.layout.policy.reqmts]), so this change would not be conflicting with existing style forms.
To make the status quo clearer this issue suggests to reword [iterator.requirements.general] to be a requirement. The alternative would be to change all currently referencing places to say "is a constexpr iterator" instead. Personally I prefer the notion of "meets the XX requirements" in this case.
The text was updated successfully, but these errors were encountered:
The term constexpr iterator is defined in [iterator.requirements.general] as follows:
The particular form of this definition using the term "called" is untypical for introducing a requirement and has let to the interpretation in the proposed wording of LWG 4038 that when we require a type to meet the requirement of a constexpr iterator we should impose an "is a constexpr iterator" requirement.
This deviates from all existing places where we impose the form "meets the constexpr iterator requirements" instead ([string.view.iterators] p1, [basic.string.general] p5, [container.opt.reqmts] p1, [array.overview] p5, [vector.overview] p3).
Note that the term "meets the XX requirements" is not restricted to the Cpp17YY requirements, we use it elsewhere too, e.g. when we say that a type meets the character traits requirements ([char.traits]), the allocator-aware container requirements ([container.alloc.reqmts), or the layout mappings requirements ([mdspan.layout.policy.reqmts]), so this change would not be conflicting with existing style forms.
To make the status quo clearer this issue suggests to reword [iterator.requirements.general] to be a requirement. The alternative would be to change all currently referencing places to say "is a constexpr iterator" instead. Personally I prefer the notion of "meets the XX requirements" in this case.
The text was updated successfully, but these errors were encountered: