Skip to content

Commit 49043f3

Browse files
author
github-actions
committed
Automatic update from GitHub Actions workflow
1 parent b43aacc commit 49043f3

22 files changed

+403
-44
lines changed

issue4284.html

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Issue 4284: Integer-class types should be formattable</title>
6+
<meta property="og:title" content="Issue 4284: Integer-class types should be formattable">
7+
<meta property="og:description" content="C++ library issue. Status: New">
8+
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue4284.html">
9+
<meta property="og:type" content="website">
10+
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
11+
<meta property="og:image:alt" content="C++ logo">
12+
<style>
13+
p {text-align:justify}
14+
li {text-align:justify}
15+
pre code.backtick::before { content: "`" }
16+
pre code.backtick::after { content: "`" }
17+
blockquote.note
18+
{
19+
background-color:#E0E0E0;
20+
padding-left: 15px;
21+
padding-right: 15px;
22+
padding-top: 1px;
23+
padding-bottom: 1px;
24+
}
25+
ins {background-color:#A0FFA0}
26+
del {background-color:#FFA0A0}
27+
table.issues-index { border: 1px solid; border-collapse: collapse; }
28+
table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
29+
table.issues-index td { padding: 4px; border: 1px solid; }
30+
table.issues-index td:nth-child(1) { text-align: right; }
31+
table.issues-index td:nth-child(2) { text-align: left; }
32+
table.issues-index td:nth-child(3) { text-align: left; }
33+
table.issues-index td:nth-child(4) { text-align: left; }
34+
table.issues-index td:nth-child(5) { text-align: center; }
35+
table.issues-index td:nth-child(6) { text-align: center; }
36+
table.issues-index td:nth-child(7) { text-align: left; }
37+
table.issues-index td:nth-child(5) span.no-pr { color: red; }
38+
@media (prefers-color-scheme: dark) {
39+
html {
40+
color: #ddd;
41+
background-color: black;
42+
}
43+
ins {
44+
background-color: #225522
45+
}
46+
del {
47+
background-color: #662222
48+
}
49+
a {
50+
color: #6af
51+
}
52+
a:visited {
53+
color: #6af
54+
}
55+
blockquote.note
56+
{
57+
background-color: rgba(255, 255, 255, .10)
58+
}
59+
}
60+
</style>
61+
</head>
62+
<body>
63+
<hr>
64+
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#New">New</a> status.</em></p>
65+
<h3 id="4284"><a href="lwg-active.html#4284">4284</a>. Integer-class types should be formattable</h3>
66+
<p><b>Section:</b> 28.5.6.4 <a href="https://wg21.link/format.formatter.spec">[format.formatter.spec]</a> <b>Status:</b> <a href="lwg-active.html#New">New</a>
67+
<b>Submitter:</b> Jiang An <b>Opened:</b> 2025-06-27 <b>Last modified:</b> 2025-06-28</p>
68+
<p><b>Priority: </b>Not Prioritized
69+
</p>
70+
<p><b>View other</b> <a href="lwg-index-open.html#format.formatter.spec">active issues</a> in [format.formatter.spec].</p>
71+
<p><b>View all other</b> <a href="lwg-index.html#format.formatter.spec">issues</a> in [format.formatter.spec].</p>
72+
<p><b>View all issues with</b> <a href="lwg-status.html#New">New</a> status.</p>
73+
<p><b>Discussion:</b></p>
74+
<p>
75+
The following program doesn't compile with MSVC STL (<a href="https://godbolt.org/z/aazK6bhqM">Godbolt link</a>).
76+
</p>
77+
<blockquote><pre>
78+
#include &lt;format&gt;
79+
#include &lt;ranges&gt;
80+
81+
int main() {
82+
auto iv1 = std::views::iota(42ull, 1729ull);
83+
auto iv2 = std::views::iota(iv1.begin(), iv1.end());
84+
std::format("{}", iv2.size()); // <span style="color:red;font-weight:bolder">Error</span>
85+
}
86+
</pre></blockquote>
87+
<p>
88+
In MSVC STL, the type of <code class='backtick'>iv2.size()</code> is an integer-class type, and the standard hasn't guaranteed there're
89+
enabled formatter specializations for integer-class types. As a result, this program is not guaranteed to
90+
be well-formed.
91+
<p/>
92+
Perhaps we should require enabled <code class='backtick'>std::formatter</code> specializations for integer-class types to get rid of
93+
such uncertainty and inconsistency.
94+
</p>
95+
96+
97+
<p id="res-4284"><b>Proposed resolution:</b></p>
98+
<p>
99+
This wording is relative to <a href="https://wg21.link/N5008">N5008</a>.
100+
</p>
101+
102+
<ol>
103+
<li><p>Modify 28.5.6.4 <a href="https://wg21.link/format.formatter.spec">[format.formatter.spec]</a> as indicated:</p>
104+
105+
<blockquote>
106+
<p>
107+
-2- [&hellip;] Each header that declares the template
108+
<code class='backtick'>formatter</code> provides the following enabled specializations:
109+
</p>
110+
<ol style="list-style-type: none">
111+
<li><p>(2.1) &mdash; [&hellip;]</p></li>
112+
<li><p>(2.2) &mdash; [&hellip;]</p></li>
113+
<li><p>(2.3) &mdash; [&hellip;]</p></li>
114+
<li><p><ins>(2.?) &mdash; For each <code class='backtick'>charT</code>, for each cv-unqualified integer-class type
115+
(24.3.4.4 <a href="https://wg21.link/iterator.concept.winc">[iterator.concept.winc]</a>) <code class='backtick'>IntegerClass</code>, a specialization</ins>
116+
</p>
117+
<blockquote><pre>
118+
<ins>template&lt;&gt; struct formatter&lt;IntegerClass, charT&gt;;</ins>
119+
</pre></blockquote>
120+
</li>
121+
<li><p>(2.4) &mdash; [&hellip;]</p></li>
122+
</ol>
123+
</blockquote>
124+
</li>
125+
126+
</ol>
127+
128+
129+
130+
131+
132+
</body>
133+
</html>

lwg-active.html

Lines changed: 73 additions & 5 deletions
Large diffs are not rendered by default.

lwg-closed.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

lwg-defects.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

lwg-immediate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HER
6262
</tr>
6363
<tr>
6464
<td align="left">Date:</td>
65-
<td align="left">Revised 2025-06-28 at 14:45:47 UTC
65+
<td align="left">Revised 2025-06-28 at 17:28:20 UTC
6666
</td>
6767
</tr>
6868
<tr>

lwg-index-open.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>Index by Section</h1>
6666
<p>This document is the Index by Section for the <a href="lwg-active.html">Library Active Issues List</a>.</p>
6767
<h2>Index by Section (non-Ready active issues only)</h2>
6868
<p><a href="lwg-index.html">(view all issues)</a></p>
69-
<p>Revised 2025-06-28 at 14:45:47 UTC
69+
<p>Revised 2025-06-28 at 17:28:20 UTC
7070
</p><h2 id="Section_3">Section 3 (2 issues)</h2>
7171
<p><a href="lwg-index.html#Section_3">(view all issues)</a></p>
7272
<table class="issues-index">
@@ -4205,7 +4205,7 @@ <h2 id="Section_27">Section 27 (20 issues)</h2>
42054205
<td></td>
42064206
</tr>
42074207
</table>
4208-
<h2 id="Section_28">Section 28 (55 issues)</h2>
4208+
<h2 id="Section_28">Section 28 (56 issues)</h2>
42094209
<p><a href="lwg-index.html#Section_28">(view all issues)</a></p>
42104210
<table class="issues-index">
42114211
<tr>
@@ -4479,9 +4479,18 @@ <h2 id="Section_28">Section 28 (55 issues)</h2>
44794479
<td></td>
44804480
</tr>
44814481
<tr>
4482-
<td id="4146"><a href="lwg-active.html#4146" title="&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors (Status: New)">4146</a><sup><a href="https://cplusplus.github.io/LWG/issue4146">(i)</a></sup></td>
4482+
<td id="4284"><a href="lwg-active.html#4284" title="Integer-class types should be formattable (Status: New)">4284</a><sup><a href="https://cplusplus.github.io/LWG/issue4284">(i)</a></sup></td>
44834483
<td><a href="lwg-active.html#New">New</a></td>
44844484
<td>28.5.6.4 [format.formatter.spec]<a id="format.formatter.spec"></a></td>
4485+
<td>Integer-class types should be formattable</td>
4486+
<td>Yes</td>
4487+
<td></td>
4488+
<td></td>
4489+
</tr>
4490+
<tr>
4491+
<td id="4146"><a href="lwg-active.html#4146" title="&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors (Status: New)">4146</a><sup><a href="https://cplusplus.github.io/LWG/issue4146">(i)</a></sup></td>
4492+
<td><a href="lwg-active.html#New">New</a></td>
4493+
<td>28.5.6.4 [format.formatter.spec]</td>
44854494
<td>&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors</td>
44864495
<td>Yes</td>
44874496
<td></td>

lwg-index.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>Index by Section</h1>
6666
<p>This document is the Index by Section for the <a href="lwg-active.html">Library Active Issues List</a>, <a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.</p>
6767
<h2>Index by Section</h2>
6868
<p><a href="lwg-index-open.html">(view only non-Ready open issues)</a></p>
69-
<p>Revised 2025-06-28 at 14:45:47 UTC
69+
<p>Revised 2025-06-28 at 17:28:20 UTC
7070
</p><h2 id="Section_2">Section 2 (2 issues)</h2>
7171
<table class="issues-index">
7272
<tr>
@@ -21301,7 +21301,7 @@ <h2 id="Section_27">Section 27 (152 issues)</h2>
2130121301
<td></td>
2130221302
</tr>
2130321303
</table>
21304-
<h2 id="Section_28">Section 28 (284 issues)</h2>
21304+
<h2 id="Section_28">Section 28 (285 issues)</h2>
2130521305
<p><a href="lwg-index-open.html#Section_28">(view only non-Ready open issues)</a></p>
2130621306
<table class="issues-index">
2130721307
<tr>
@@ -22911,9 +22911,18 @@ <h2 id="Section_28">Section 28 (284 issues)</h2>
2291122911
<td></td>
2291222912
</tr>
2291322913
<tr>
22914-
<td id="4146"><a href="lwg-active.html#4146" title="&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors (Status: New)">4146</a><sup><a href="https://cplusplus.github.io/LWG/issue4146">(i)</a></sup></td>
22914+
<td id="4284"><a href="lwg-active.html#4284" title="Integer-class types should be formattable (Status: New)">4284</a><sup><a href="https://cplusplus.github.io/LWG/issue4284">(i)</a></sup></td>
2291522915
<td><a href="lwg-active.html#New">New</a></td>
2291622916
<td>28.5.6.4 [format.formatter.spec]<a id="format.formatter.spec"></a></td>
22917+
<td>Integer-class types should be formattable</td>
22918+
<td>Yes</td>
22919+
<td></td>
22920+
<td></td>
22921+
</tr>
22922+
<tr>
22923+
<td id="4146"><a href="lwg-active.html#4146" title="&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors (Status: New)">4146</a><sup><a href="https://cplusplus.github.io/LWG/issue4146">(i)</a></sup></td>
22924+
<td><a href="lwg-active.html#New">New</a></td>
22925+
<td>28.5.6.4 [format.formatter.spec]</td>
2291722926
<td>&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors</td>
2291822927
<td>Yes</td>
2291922928
<td></td>

lwg-ready.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>C++ Standard Library Issues to be moved in [INSERT CURRENT MEETING HERE]</h1
6262
</tr>
6363
<tr>
6464
<td align="left">Date:</td>
65-
<td align="left">Revised 2025-06-28 at 14:45:47 UTC
65+
<td align="left">Revised 2025-06-28 at 17:28:20 UTC
6666
</td>
6767
</tr>
6868
<tr>

lwg-status-date.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ <h1>Index by Status and Date</h1>
6767
This document is the Index by Status and Date for the <a href="lwg-active.html">Library Active Issues List</a>,
6868
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
6969
</p>
70-
<p>Revised 2025-06-28 at 14:45:47 UTC
70+
<p>Revised 2025-06-28 at 17:28:20 UTC
7171
</p><h2 id="Ready">Ready (1 issues)</h2>
7272
<table class="issues-index">
7373
<tr>
@@ -266,7 +266,7 @@ <h2 id="Tentatively_NAD">Tentatively NAD (14 issues)</h2>
266266
<td></td>
267267
</tr>
268268
</table>
269-
<h2 id="New">New (501 issues)</h2>
269+
<h2 id="New">New (502 issues)</h2>
270270
<table class="issues-index">
271271
<tr>
272272
<th><a href="lwg-toc.html">Issue</a></th>
@@ -305,6 +305,15 @@ <h2 id="New">New (501 issues)</h2>
305305
<td></td>
306306
</tr>
307307
<tr>
308+
<td id="4284"><a href="lwg-active.html#4284" title="Integer-class types should be formattable (Status: New)">4284</a><sup><a href="https://cplusplus.github.io/LWG/issue4284">(i)</a></sup></td>
309+
<td><a href="lwg-active.html#New">New</a></td>
310+
<td>28.5.6.4 [format.formatter.spec]</td>
311+
<td>Integer-class types should be formattable</td>
312+
<td>Yes</td>
313+
<td></td>
314+
<td></td>
315+
</tr>
316+
<tr>
308317
<td id="4281"><a href="lwg-active.html#4281" title="Inconsistency between value_or() and error_or() in std::expected (Status: New)">4281</a><sup><a href="https://cplusplus.github.io/LWG/issue4281">(i)</a></sup></td>
309318
<td><a href="lwg-active.html#New">New</a></td>
310319
<td>22.5.3.7 [optional.observe]</td>

lwg-status.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>Index by Status and Section</h1>
6262
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
6363
</p>
6464

65-
<p>Revised 2025-06-28 at 14:45:47 UTC
65+
<p>Revised 2025-06-28 at 17:28:20 UTC
6666
</p><h2 id="Ready">Ready (1 issues)</h2>
6767
<table class="issues-index">
6868
<tr>
@@ -261,7 +261,7 @@ <h2 id="Tentatively_NAD">Tentatively NAD (14 issues)</h2>
261261
<td></td>
262262
</tr>
263263
</table>
264-
<h2 id="New">New (501 issues)</h2>
264+
<h2 id="New">New (502 issues)</h2>
265265
<table class="issues-index">
266266
<tr>
267267
<th><a href="lwg-toc.html">Issue</a></th>
@@ -3627,6 +3627,15 @@ <h2 id="New">New (501 issues)</h2>
36273627
<td></td>
36283628
</tr>
36293629
<tr>
3630+
<td id="4284"><a href="lwg-active.html#4284" title="Integer-class types should be formattable (Status: New)">4284</a><sup><a href="https://cplusplus.github.io/LWG/issue4284">(i)</a></sup></td>
3631+
<td><a href="lwg-active.html#New">New</a></td>
3632+
<td>28.5.6.4 [format.formatter.spec]</td>
3633+
<td>Integer-class types should be formattable</td>
3634+
<td>Yes</td>
3635+
<td></td>
3636+
<td></td>
3637+
</tr>
3638+
<tr>
36303639
<td id="4146"><a href="lwg-active.html#4146" title="&sect;[format.formatter.spec]/3 unconditionally enables nonlocking for container adaptors (Status: New)">4146</a><sup><a href="https://cplusplus.github.io/LWG/issue4146">(i)</a></sup></td>
36313640
<td><a href="lwg-active.html#New">New</a></td>
36323641
<td>28.5.6.4 [format.formatter.spec]</td>

0 commit comments

Comments
 (0)