<html><head><meta charset="UTF-8">
<title>Mandating the Standard Library: Clause 20 - Strings library</title>
  <style type='text/css'>
  body {font-variant-ligatures: none;}
  p {text-align:justify}
  li {text-align:justify}
  blockquote.note, div.note
  {
          background-color:#E0E0E0;
          padding-left: 15px;
          padding-right: 15px;
          padding-top: 1px;
          padding-bottom: 1px;
  }
  p code {color:navy}
  ins p code {color:#00A000}
  p ins code {color:#00A000}
  p del code {color:#A00000}
  ins {color:#00A000}
  del {color:#A00000}
  table#boilerplate { border:0 }
  table#boilerplate td { padding-left: 2em }
  table.bordered, table.bordered th, table.bordered td {
    border: 1px solid;
    text-align: center;
  }
  ins.block {color:#00A000; text-decoration: none}
  del.block {color:#A00000; text-decoration: none}
  #hidedel:checked ~ * del, #hidedel:checked ~ * del * { display:none; visibility:hidden }
  </style>
</head><body>
<table id="boilerplate">
<tr><td>Document number</td><td>P1462R1</td></tr>
<tr><td>Date</td><td>2019-02-20</td></tr>
<tr><td>Project</td><td>Programming Language C++, Library Working Group</td></tr>
<tr><td>Reply-to</td><td>Marshall Clow &lt;mclow.lists&#x40;gmail.com&gt;</td></tr>
</table><hr>
<h1>Mandating the Standard Library: Clause 20 - Strings library</h1>
<p>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.</p>

<p>The changes in this series of papers fall into four broad categories.</p>

<ul>
<li>Change "participate in overload resolution" wording into "Constraints" elements</li>
<li>Change "Requires" elements into either "Mandates" or "Expects", depending (mostly) on whether or not they can be checked at compile time.</li>
<li>Drive-by fixes (hopefully very few)</li>
</ul>


<p>This paper covers Clause 20 (Strings)</p>

<p>Due to Tim Song's recent rework of Clause 20 in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1148r0.pdf">P01184R0</a>, there is very little to do here.</p>

<a name="Wording"></a>
<h3>Wording</h3>

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

<p><del>Requires:</del><ins>Expects:</ins> <code>state_type</code> shall meet the <em>Cpp17Destructible</em> ...</p>

<p><em>Drive-by fixes:</em></p>

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

<p><del>Effects: Constructs an empty <code>basic_string_view</code></del></p>

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

<p><ins>Returns: <code>*this</code>.</ins></p>

<p>and also move p13 to before p12. The order of the clauses there should be: Effects, Returns, Throws.</p>
</body></html>
