[Bug libstdc++/59087] Issues including complex.h in C++11/1y mode because of C's complex.h
3dw4rd at verizon dot net
gcc-bugzilla@gcc.gnu.org
Thu Nov 14 15:30:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59087
--- Comment #7 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
OK, it took me a while to remember this (even though I put it in myself).
By default, g++ -std=c++11/1y intercepts numeric suffixes for C++11
user-defined literals.
By default g++ -std=gnu++11/1y allow complex and fixed-point literals suffixes
to be interpreted by the implementation - Allowing iF suffix for example to be
_Complex.
This is why http://melpon.org/wandbox/permlink/CnsddYRxUohlCGF1 "worked" and my
tree (where I used -std=c++1*) "didn't work".
See http://gcc.gnu.org/gcc-4.8/changes.html.
Using g++ -std=c++11 -fext-numeric-literals allows your code.
Using g++ -std=gnu++11 -fno-numeric-literals allows iF to be searched for
user-defined literal (there isn't one so error).
g++ is working as intended.
More information about the Gcc-bugs
mailing list