1 // DR 1589 2 // { dg-require-effective-target c++11 } 3 4 #include <initializer_list> 5 6 struct Pair 7 { 8 Pair(const char *, const char *); 9 }; 10 11 struct String 12 { 13 String(const char *); 14 }; 15 16 void f1(int); // #1 17 int f1(std::initializer_list<long>); // #2 g1()18int g1() { return f1({42}); } // chooses #2 19 20 void f2(Pair); // #3 21 int f2(std::initializer_list<String>); // #4 g2()22int g2() { return f2({"foo","bar"}); } // chooses #4 23