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

2780. basic_string_view::copy is missing constexpr

Section: 20.4 [string.view] Status: Open Submitter: Billy Robert O'Neal III Opened: 2016-10-07 Last modified: 2018-06-23

Priority: 2

View other active issues in [string.view].

View all other issues in [string.view].

View all issues with Open status.

Discussion:

Now that we have C++14 relaxed constexpr, we can also take care of the assignment operator and copy.

[Issues processing Telecon 2016-10-07]

Split off from 2778

[2016-11-12, Issaquah]

Sat PM: Status LEWG

[LEWG Kona 2017]

Recommend NAD: Don't want to spend the committee time. Can call std::copy if you want this, after LEWG159 goes into C++20.

[2018-06 Rapperswil Wednesday issues processing]

This will be addressed by P1032.

Proposed resolution:

This wording is relative to N4606.

  1. In 20.4.2 [string.view.template], add constexpr to copy:

    constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const;
    
  2. In 20.4.2.6 [string.view.ops], add constexpr to copy:

    constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const;