std::text_encoding::aliases_view
should have constexpr iteratorsSection: 28.4.2.5 [text.encoding.aliases] Status: WP Submitter: Jonathan Wakely Opened: 2024-01-16 Last modified: 2024-04-02
Priority: Not Prioritized
View all issues with WP status.
Discussion:
aliases_view::begin()
and aliases_view::end()
are constexpr functions, but there is no requirement that you can use
the returned iterator and sentinel in constant expressions.
[2024-03-12; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[Tokyo 2024-03-23; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4971.
Modify 28.4.2.5 [text.encoding.aliases] as indicated:
struct text_encoding::aliases_view : ranges::view_interface<text_encoding::aliases_view> { constexpr implementation-defined begin() const; constexpr implementation-defined end() const; };-1-
text_encoding::aliases_view
modelscopyable
,ranges::view
,ranges::random_access_range
, andranges::borrowed_range
.-2- Both
ranges::range_value_t<text_encoding::aliases_view>
andranges::range_reference_t<text_encoding::aliases_view>
denoteconst char*
.-?-
ranges::iterator_t<text_encoding::aliases_view>
is a constexpr iterator (24.3.1 [iterator.requirements.general]).