2 // { dg-do compile { target c++14 } }
7 template<typename T, T x>
10 typedef meta_value type;
12 static const T value = x;
16 template<typename T, T... data>
19 typedef meta_array type;
23 // static array -> runtime array conversion utility
27 template<typename T, T... xs>
28 struct array_gen<meta_array<T, xs...>>
30 static const T value[sizeof...(xs)];
33 template<typename T, T... xs>
35 array_gen<meta_array<T, xs...>>::value[sizeof...(xs)] = {xs...};
38 template<typename T, T... xs>
39 constexpr meta_array<T, xs...>
42 static_assert(sizeof...(xs) == 3, "What's wrong with you?");
43 return meta_array<T, xs...>();
50 const char (& xs)[3] = array_gen<decltype("123"_s)>::value;