Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
array
,basic_string
,basic_string_view
,valarray
, andvector
(span
is not yet implemented) modelcontiguous_range
by defining the nested typeiterator_concept
tocontiguous_iterator_tag
initerator
andconst_iterator
, and specializingpointer_traits
for those types (to fulfillcontiguous_iterator
'sstd::to_address
requirement)basic_string_view
(Ditto, nospan
yet) models the exposition-onlyforwarding-range
concept (which indicates that the validity of iterators is not bound to the lifetime of the range) by defining hidden-friend overloads ofbegin
andend
that accept rvaluesDrive-by:
_Unfancy
internal helper function[[nodiscard]]
_Can_begin
requirement fromstd::ranges::_Begin::_Cpo::_Choose
Add test coverage to
devcrt/P0896R4_ranges_range_machinery
:test_std_container
:data
andcdata
reject rvalue arguments since the returned pointer could potentially dangle (contiguous_range
codepaths were lacking coverage)size_type
of a standard container can be other thanstd::size_t
when using fancy pointerscontiguous_range
even when using an "old" fancy pointer type that does not modelcontiguous_iterator
Checklist:
Working Draft.
_Ugly
as perhttps://eel.is/c++draft/lex.name#3.1 .
_Ugly
.what happens to compile.
by an STL maintainer before CI is online, leave this unchecked for initial
submission).
members, adding virtual functions, changing whether a type is an aggregate or
trivially copyable, etc.). If unsure, leave this box unchecked and ask a
maintainer for help.
This is a replay of Microsoft-internal pull request 201813.