This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/81122] New: parsing f stopped after '0' when reading std::hexfloat >> f;
- From: "kohlhz at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Jun 2017 16:34:41 +0000
- Subject: [Bug libstdc++/81122] New: parsing f stopped after '0' when reading std::hexfloat >> f;
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Bug ID: 81122
Summary: parsing f stopped after '0' when reading std::hexfloat
>> f;
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kohlhz@t-online.de
Target Milestone: ---
Created attachment 41578
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41578&action=edit
commented example showing the effect
Any reading of hexfloat values is stopping after '0',
e.g.
std::istringstream("0x1P-1022") >> std::hexfloat >> f;
yields f = 0, next char to read is 'x'.
I'm not knowing the standard reaction, but found an example source giving the
expected result.
My source taken in parts from this source:
http://naipc.uchicago.edu/2014/ref/cppreference/en/cpp/io/manip/fixed.html