You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>This paper proposes making <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>error_code</c-></code> formattable using the formatting
2139
2140
facility introduced in C++20 (<codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>format</c-></code>) and fixes encoding issues in the
2140
2141
underlying API (<adata-link-type="biblio" href="#biblio-lwg4156" title="`error_category` messages have unspecified encoding">[LWG4156]</a>).</p>
2141
-
<h2class="heading settled" data-level="2" id="changes2"><spanclass="secno">2. </span><spanclass="content">Changes since R2</span><aclass="self-link" href="#changes2"></a></h2>
2142
+
<h2class="heading settled" data-level="2" id="changes3"><spanclass="secno">2. </span><spanclass="content">Changes since R3</span><aclass="self-link" href="#changes3"></a></h2>
2143
+
<ul>
2144
+
<lidata-md>
2145
+
<p>Fixed a typo in the wording.</p>
2146
+
</ul>
2147
+
<h2class="heading settled" data-level="3" id="changes2"><spanclass="secno">3. </span><spanclass="content">Changes since R2</span><aclass="self-link" href="#changes2"></a></h2>
2142
2148
<ul>
2143
2149
<lidata-md>
2144
2150
<p>Added a reference to <adata-link-type="biblio" href="#biblio-p2930" title="Formatter specializations for the standard library">[P2930]</a> and how it differs from the current proposal.</p>
2145
2151
</ul>
2146
-
<h2class="heading settled" data-level="3" id="changes1"><spanclass="secno">3. </span><spanclass="content">Changes since R1</span><aclass="self-link" href="#changes1"></a></h2>
2152
+
<h2class="heading settled" data-level="4" id="changes1"><spanclass="secno">4. </span><spanclass="content">Changes since R1</span><aclass="self-link" href="#changes1"></a></h2>
2147
2153
<ul>
2148
2154
<lidata-md>
2149
2155
<p>Added a debug format to avoid ambiguity when formatting error codes in maps.</p>
2150
2156
<lidata-md>
2151
2157
<p>Added SG16 poll results.</p>
2152
2158
</ul>
2153
-
<h2class="heading settled" data-level="4" id="changes0"><spanclass="secno">4. </span><spanclass="content">Changes since R0</span><aclass="self-link" href="#changes0"></a></h2>
2159
+
<h2class="heading settled" data-level="5" id="changes0"><spanclass="secno">5. </span><spanclass="content">Changes since R0</span><aclass="self-link" href="#changes0"></a></h2>
2154
2160
<ul>
2155
2161
<lidata-md>
2156
2162
<p>Changed the title from "Formatting of std::error_code" to "Fix encoding
<p><strong>Poll 1</strong>: Forward P3395R0 to LEWG amended to specify an encoding for <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>error_category</c-><c-o>::</c-><c-n>name</c-><c-p>()</c-></code> and for transcoding to be to UTF-8 if that
2170
2176
matches the ordinary literal encoding and to an implementation-defined encoding
<p>This paper proposes adding a <codeclass="highlight"><c-n>formatter</c-></code> specialization for <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>error_code</c-></code> to address the problems discussed in the previous section.</p>
2198
2204
<p>The default format will produce the same output as the <codeclass="highlight"><c-n>ostream</c-></code> inserter:</p>
likely need to change anyway. This also resolves <adata-link-type="biblio" href="#biblio-lwg4156" title="`error_category` messages have unspecified encoding">[LWG4156]</a>.</p>
2257
2263
<p>An alternative approach could involve communicating the encoding from <codeclass="highlight"><c-n>error_category</c-></code>. However, this introduces ABI challenges and complicates usage
<p>A formatter for <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>error_code</c-></code> was proposed as part of <adata-link-type="biblio" href="#biblio-p2930" title="Formatter specializations for the standard library">[P2930]</a> which
2261
2267
has more formatting options but doesn’t try to address encoding issues.</p>
<p>The proposed <codeclass="highlight"><c-n>formatter</c-></code> for <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>error_code</c-></code> has been implemented in the
0 commit comments