1 // PR c++/64665, DR 1467 2 // { dg-do compile { target c++11 } } 3 4 #include <string> 5 6 bool Test1(bool); 7 bool Test1(std::string) = delete; 8 9 bool Test2(int) = delete; 10 bool Test2(std::initializer_list<int>); 11 12 struct S 13 { SS14 S(int _a) : a(_a) {} 15 private: 16 int a; 17 }; 18 bool Test3(int); 19 bool Test3(S) = delete; 20 21 bool Test4(bool) = delete; 22 bool Test4(std::initializer_list<std::string>); 23 main()24int main () 25 { 26 ( Test1({"false"}) ); // { dg-error "narrowing" "" { target c++2a } } 27 ( Test2({123}) ); 28 ( Test3({456}) ); 29 ( Test4({"false"}) ); 30 } 31