Created on 2022-09-09.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to n4917.
Modify [iterator.synopsis], header <iterator> synopsis, as indicated:
#include <compare> // see [compare.syn] #include <concepts> // see [concepts.syn] namespace std { […] // [const.iterators], constant iterators and sentinels // [const.iterators.alias], alias templates […] template<input_iterator I> using const_iterator = see below; // freestanding template<semiregularclassS> using const_sentinel = see below; // freestanding […] template<input_iterator I> constexpr const_iterator<I> make_const_iterator(I it) { return it; } // freestanding template<semiregularclassS> constexpr const_sentinel<S> make_const_sentinel(S s) { return s; } // freestanding […] }
Modify [const.iterators.alias] as indicated:
template<semiregularclassS> using const_sentinel = see below;-2- Result: If S models input_iterator, const_iterator<S>. Otherwise, S.
[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP. ]
[ 2022-09-23; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
The current standard does not have any constraints on const_sentinel template parameters, which makes it possible to pass almost any type of object to make_const_sentinel. It would be more appropriate to constrain the type to meet the minimum requirements of the sentinel type such as semiregular as move_sentinel does.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-11-17 00:42:33 | admin | set | messages: + msg13071 |
2022-11-17 00:42:33 | admin | set | status: voting -> wp |
2022-11-08 03:46:49 | admin | set | status: ready -> voting |
2022-09-23 15:43:32 | admin | set | messages: + msg12787 |
2022-09-23 15:43:32 | admin | set | status: new -> ready |
2022-09-09 00:00:00 | admin | create | |
2022-09-03 18:11:40 | admin | set | messages: + msg12739 |