gcc/testsuite/g++.dg/conversion/pr66895.C
raw| 1 | // PR c++/66895 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | #include <cstddef> |
| 5 | #include <initializer_list> |
| 6 | |
| 7 | struct S { |
| 8 | template<std::size_t N> S(char const (&)[N]); |
| 9 | }; |
| 10 | struct T1 { S s; }; |
| 11 | void f1(std::initializer_list<T1>); |
| 12 | void g1() { f1({{""}}); } |
| 13 | |
| 14 | struct T2 { const S& s; }; |
| 15 | void f2(std::initializer_list<T2>); |
| 16 | void g2() { f2({{""}}); } |