https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117257

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Though, in the libstdc++ case, aren't those complex(_Complex double x); etc.
> ctors an extension which is causing this?

Yes, without those constructors std::complex<double>({1.0, 1.0}) is just
ill-formed. So the fact that it compiles with GCC is an extension, which is
fine.

If you use the standard-conforming std::complex<double>(1.0, 1.0) then it works
fine. So if you want portable behaviour, write portable code.

Reply via email to