2 // { dg-do compile { target c++11 } }
4 // Check we're able to evaluate these.
6 #define SA(X) static_assert((X),#X)
8 constexpr char s[] = "abc";
9 constexpr int t[] = { 'a', 'b', 'c', '\0' };
35 constexpr auto c1 = fn1 (&s[0]);
36 constexpr auto c2 = fn1 (&s[1]);
37 constexpr auto c3 = fn1 (&s[2]);
43 constexpr auto d1 = fn2 (&s[0]);
44 constexpr auto d2 = fn2 (&s[1]);
45 constexpr auto d3 = fn2 (&s[2]);
51 constexpr auto e1 = fn3 (&t[0]);
52 constexpr auto e2 = fn3 (&t[1]);
53 constexpr auto e3 = fn3 (&t[2]);
59 constexpr auto f1 = fn4 (&t[0]);
60 constexpr auto f2 = fn4 (&t[1]);
61 constexpr auto f3 = fn4 (&t[2]);