// PR c++/64665, DR 1467 // { dg-do compile { target c++11 } } #include bool Test1(bool); bool Test1(std::string) = delete; bool Test2(int) = delete; bool Test2(std::initializer_list); struct S { S(int _a) : a(_a) {} private: int a; }; bool Test3(int); bool Test3(S) = delete; bool Test4(bool) = delete; bool Test4(std::initializer_list); int main () { ( Test1({"false"}) ); // { dg-error "narrowing" "" { target c++2a } } ( Test2({123}) ); ( Test3({456}) ); ( Test4({"false"}) ); }