Document numberP1462R1
Date2019-02-20
ProjectProgramming Language C++, Library Working Group
Reply-toMarshall Clow <mclow.lists@gmail.com>

Mandating the Standard Library: Clause 20 - Strings library

With the adoption of P0788R3, we have a new way of specifying requirements for the library clauses of the standard. This is one of a series of papers reformulating the requirements into the new format. This effort was strongly influenced by the informational paper P1369R0.

The changes in this series of papers fall into four broad categories.

This paper covers Clause 20 (Strings)

Due to Tim Song's recent rework of Clause 20 in P01184R0, there is very little to do here.

Wording

In [char.traits.typedefs]/3, change the "Requires" to an "Expects":

Requires:Expects: state_type shall meet the Cpp17Destructible ...

Drive-by fixes:

In [string.view.cons]/1, remove the useless wording:

Effects: Constructs an empty basic_string_view

Before [string.insert]/12, insert the missing:

Returns: *this.

and also move p13 to before p12. The order of the clauses there should be: Effects, Returns, Throws.