https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes that's expected. It's the same issue. Libstdc++ still follows the C++98 spec which means there is no such thing as a hex float, and so "0x" cannot be the start of a floating point value, it's just "0". There are two parts to support for parsing hex floats: firstly the standard needs to be updated to allow 'p' and 'P' to be accumulated and passed to strtod. Secondly, implementations need to be updated to recognize hex floats (which means parsing numbers beginning with "0x" and also supporting exponents following 'p' or 'P'). As I said in comment 9: "I don't want to change our implementation yet, until the intention of the committee is clear." "We know you can't currently read hex floats using istreams with libstdc++, we know it's a defect in the standard, we're working on it."