Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/inline-var4.C

raw
1 // PR c++/82782
2 // { dg-do compile { target c++17 } }
3
4 template <const auto& Value>
5 struct make_char_sequence;
6
7 template <int N, const char (&StringLiteral)[N]>
8 struct make_char_sequence<StringLiteral>
9 {
10 using type = int;
11 };
12
13 template <const auto& StringLiteral>
14 using make_char_sequence_t = typename make_char_sequence<StringLiteral>::type;
15
16 inline constexpr char sample[] = "Sample";
17
18 using X = make_char_sequence_t<sample>;