Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C

raw
1 // PR c++/92015
2 // { dg-do compile { target c++11 } }
3
4 struct S1 { char c[6] {'h', 'e', 'l', 'l', 'o', 0}; };
5 struct S2 { char c[6] = "hello"; };
6 static_assert (S1{}.c[0] == 'h', "");
7 static_assert (S2{}.c[0] == 'h', "");