https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86598
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Fri, 20 Jul 2018, zhonghao at pku dot org.cn wrote: > g++ rejects the above code: You don't say what options you are using, or what compiler version; please include that in future bug reports that assert something about how the compiler behaves. For standards conformance issues like this you should be using strict conformance modes. I don't see this rejection with any of -std=c++98, -std=c++11, -std=c++14. That would be what was fixed for C++11/C++14 modes with r234213 ("Hex floats are new in C++1z."), and for C++98 mode as bug 23827.