This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively NAD status.
4163. Can the overload ofstd::num_get::do_get
for bool
call the overload for long
?
Section: 28.3.4.3.2.3 [facet.num.get.virtuals] Status: Tentatively NAD Submitter: Jiang An Opened: 2024-09-29 Last modified: 2025-02-07
Priority: Not Prioritized
View other active issues in [facet.num.get.virtuals].
View all other issues in [facet.num.get.virtuals].
View all issues with Tentatively NAD status.
Discussion:
28.3.4.3.2.3 [facet.num.get.virtuals]/6 currently says:
Effects: If
(str.flags()&ios_base::boolalpha) == 0
then input proceeds as it would for along
except that if a value is being stored intoval
, […]
It is unclear whether an implementation is allowed to call the overload for long
in this case. Currently, libc++'s version calls that overload, while libstdc++ and MSVC STL's don't (example).
[2025-02-07; Reflector poll: NAD]
I think this is just a libc++ bug. The wording says it "proceeds as it would for long
", which is not the same as actually making a virtual call to do_get
for long
. It can either duplicate the code from do_get
for long
, or make a non-virtual (i.e. qualified) call to num_get::do_get
.
Proposed resolution:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4