Narrowing conversion to bool in list-initialization - strange behaviour
问题 Consider this piece of C++11 code: #include <iostream> struct X { X(bool arg) { std::cout << arg << '\n'; } }; int main() { double d = 7.0; X x{d}; } There's a narrowing conversion from a double to a bool in the initialization of x . According to my understanding of the standard, this is ill-formed code and we should see some diagnostic. Visual C++ 2013 issues an error: error C2398: Element '1': conversion from 'double' to 'bool' requires a narrowing conversion However, both Clang 3.5.0 and