A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue3573 below:

Missing Throws element for basic_string_view(It begin, End end)

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++23 status.

3573. Missing Throws element for basic_string_view(It begin, End end)

Section: 27.3.3.2 [string.view.cons] Status: C++23 Submitter: Hewill Kang Opened: 2021-07-13 Last modified: 2023-11-22

Priority: Not Prioritized

View all other issues in [string.view.cons].

View all issues with C++23 status.

Discussion:

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.

[2021-08-20; Reflector poll]

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

[2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting → WP.]

Proposed resolution:

This wording is relative to N4892.

  1. Modify 27.3.3.2 [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.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4