Skip to content

Commit ff83d48

Browse files
committed
New issue from Jiang An: "Can the overload of std::num_get::do_get for bool call the overload for long?"
1 parent 797a61e commit ff83d48

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

xml/issue4163.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4162" status="New">
5+
<title>Can the overload of <tt>std::num_get::do_get</tt> for <tt>bool</tt> call the overload for <tt>long</tt>?</title>
6+
<section><sref ref="[facet.num.get.virtuals]"/></section>
7+
<submitter>Jiang An</submitter>
8+
<date>29 Sep 2024</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
<sref ref="[facet.num.get.virtuals]"/>/6 currently says:
14+
</p>
15+
<blockquote style="border-left: 3px solid #ccc;padding-left: 15px;">
16+
<p>
17+
<i>Effects</i>: If <tt>(str.flags()&amp;ios_base::boolalpha) == 0</tt> then input proceeds as it would for a
18+
<tt>long</tt> except that if a value is being stored into <tt>val</tt>, [&hellip;]
19+
</p>
20+
</blockquote>
21+
<p>
22+
It is unclear whether an implementation is allowed to call the overload for <tt>long</tt> in this case.
23+
Currently, libc++'s version calls that overload, while libstdc++ and MSVC STL's don't
24+
(<a href="https://godbolt.org/z/83M1hKThv">example</a>).
25+
<p/>
26+
As the divergence implementation strategies is observable, perhaps we should clarify on this.
27+
</p>
28+
</discussion>
29+
30+
<resolution>
31+
</resolution>
32+
33+
</issue>

0 commit comments

Comments
 (0)