Title
std::text_encoding::aliases_view should have constexpr iterators
Status
wp
Section
[text.encoding.aliases]
Submitter
Jonathan Wakely

Created on 2024-01-16.00:00:00 last changed 8 months ago

Messages

Date: 2024-04-02.10:29:12

Proposed resolution:

This wording is relative to N4971.

  1. Modify [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 models copyable, ranges::view, ranges::random_access_range, and ranges::borrowed_range.

    -2- Both ranges::range_value_t<text_encoding::aliases_view> and ranges::range_reference_t<text_encoding::aliases_view> denote const char*.

    -?- ranges::iterator_t<text_encoding::aliases_view> is a constexpr iterator ([iterator.requirements.general]).

Date: 2024-04-02.10:29:12

[ Tokyo 2024-03-23; Status changed: Voting → WP. ]

Date: 2024-03-15.00:00:00

[ 2024-03-12; Reflector poll ]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Date: 2024-01-16.00:00:00

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.

History
Date User Action Args
2024-04-02 10:29:12adminsetmessages: + msg14046
2024-04-02 10:29:12adminsetstatus: voting -> wp
2024-03-18 09:32:04adminsetstatus: ready -> voting
2024-03-12 01:17:26adminsetmessages: + msg13999
2024-03-12 01:17:26adminsetstatus: new -> ready
2024-01-16 12:32:53adminsetmessages: + msg13920
2024-01-16 00:00:00admincreate