[Bug c++/71985] narrowing in initializer lists is not ill-formed where required

nico at josuttis dot de gcc-bugzilla@gcc.gnu.org
Mon Jul 25 08:04:00 GMT 2016


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

--- Comment #10 from Nicolai Josuttis <nico at josuttis dot de> ---
OK, thanks for the discussion and especially for the FAQ entry.

I still find it a bit unfortunate that clang and VC++ give an error
while gcc does not.
Especially as std::initializer_lists<> AFAIK were specifically designed
to make narrowing ill-formed (for which I always thought that
an error is appropriate, especially when using --pedantic)

I'll document this in my trainings and will add
-pedantic-errors
to my Makefiles.

Best. Nico


More information about the Gcc-bugs mailing list