Title
Missing Preconditions in concat_view::iterator's conversion constructor
Status
wp
Section
[range.concat.iterator]
Submitter
Hewill Kang

Created on 2024-04-26.00:00:00 last changed 2 weeks ago

Messages

Date: 2024-07-08.09:00:03

Proposed resolution:

This wording is relative to N4981.

  1. Modify [range.concat.iterator] as indicated:

    constexpr iterator(iterator<!Const> it)
      requires Const &&
               (convertible_to<iterator_t<Views>, iterator_t<const Views>> && ...);
    

    -?- Preconditions: it.it_.valueless_by_exception() is false.

    -8- Effects: Initializes parent_ with it.parent_, and let i be it.it_.index(), initializes it_ with base-iter(in_place_index<i>, std::get<i>(std::move(it.it_))).

Date: 2024-07-08.09:00:03

[ St. Louis 2024-06-29; Status changed: Voting → WP. ]

Date: 2024-05-15.00:00:00

[ 2024-05-08; Reflector poll ]

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

Date: 2024-04-26.00:00:00

This conversion constructor obtains the alternative iterator of the argument through std::get, which will throw when the variant is valueless. We seem to be missing a Preconditions element here.

History
Date User Action Args
2024-07-08 09:00:03adminsetmessages: + msg14242
2024-07-08 09:00:03adminsetstatus: voting -> wp
2024-06-24 13:01:55adminsetstatus: ready -> voting
2024-05-08 10:36:29adminsetmessages: + msg14124
2024-05-08 10:36:29adminsetstatus: new -> ready
2024-04-27 13:25:11adminsetmessages: + msg14080
2024-04-26 00:00:00admincreate