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

Created on 2024-04-26.00:00:00 last changed 1 month ago

Messages

Date: 2024-05-08.10:36:29

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-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-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