[Bug c++/71985] narrowing in initializer lists is not ill-formed where required
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 24 15:23:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71985
--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Note also that we give two warnings:
prog.cc:7:15: error: narrowing conversion of '0.0' from 'double' to 'int'
inside { } [-Wnarrowing]
B b2 { 1, 0.0 };
^
prog.cc:9:25: warning: narrowing conversion of 'd' from 'double' to 'int'
inside { } [-Wnarrowing]
std::vector<int> v1 { d };
^
prog.cc:9:25: warning: narrowing conversion of 'd' from 'double' to 'int'
inside { } [-Wnarrowing]
More information about the Gcc-bugs
mailing list