PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / g++.dg / conversion / pr66895.C
blob14203bdab50beb931568c7b25bb0a4346c21c37f
1 // PR c++/66895
2 // { dg-do compile { target c++11 } }
4 #include <cstddef>
5 #include <initializer_list>
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({{""}}); }
14 struct T2 { const S& s; };
15 void f2(std::initializer_list<T2>);
16 void g2() { f2({{""}}); }