Title
Missing Throws element for basic_string_view(It begin, End end)
Status
new
Section
[string.view.cons]
Submitter
Hewill Kang

Created on 2021-07-13.00:00:00 last changed 2 weeks ago

Messages

Date: 2021-07-17.17:00:32

Proposed resolution:

This wording is relative to N4892.

  1. Modify [string.view.cons] as indicated:

    template<class It, class End>
      constexpr basic_string_view(It begin, End end);
    

    -7- Constraints:

    […]

    -8- Preconditions:

    […]

    -9- Effects: Initializes data_ with to_address(begin) and initializes size_ with end - begin.

    -?- Throws: When and what end - begin throws.

Date: 2021-07-13.00:00:00

The standard does not specify the exceptions of this constructor, but since std::to_address is a noexcept function, this constructor throws if and only when end - begin throws, we should add a Throws element for it.

History
Date User Action Args
2021-07-17 17:00:32adminsetmessages: + msg11972
2021-07-13 00:00:00admincreate