Created on 2018-04-12.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4741.
Edit [span.overview] as indicated:
-4- The iterator types
for span is a random access iterator and a contiguous iteratorspan::iterator and span::const_iterator are random access iterators ([random.access.iterators]), contiguous iterators ([iterator.requirements.general]), and constexpr iterators ([iterator.requirements.general]). All requirements on container iterators ([container.requirements]) apply to span::iterator and span::const_iterator as well.
[ 2018-06 Rapperswil: Adopted ]
[ 2018-04-23 Moved to Tentatively Ready after 6 positive votes on c++std-lib. ]
There are multiple issues with how span specifies its iterators:
const_iterator isn't mentioned.
The relationship between iterator and const_iterator isn't specified. (span isn't a container, so it doesn't receive this automatically.)
The iterators should be specified to be constexpr.
By imitating [string.view.iterators]/3 "All requirements on container iterators ([container.requirements]) apply to basic_string_view::const_iterator as well.", we can specify that iterator is convertible to const_iterator.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-06-12 01:05:16 | admin | set | messages: + msg9892 |
2018-06-12 01:05:16 | admin | set | status: voting -> wp |
2018-05-06 19:23:13 | admin | set | status: ready -> voting |
2018-05-05 12:09:50 | admin | set | messages: + msg9831 |
2018-05-05 12:09:50 | admin | set | status: new -> ready |
2018-04-22 14:59:16 | admin | set | messages: + msg9823 |
2018-04-12 00:00:00 | admin | create |