2 // { dg-do compile { target c++14 } }
8 template<typename T, T x>
11 typedef meta_value type;
13 static const T value = x;
17 template<typename T, T... data>
20 typedef meta_array type;
24 // static array -> runtime array conversion utility
28 template<typename T, T... xs>
29 struct array_gen<meta_array<T, xs...>>
31 static const T value[sizeof...(xs)];
34 template<typename T, T... xs>
36 array_gen<meta_array<T, xs...>>::value[sizeof...(xs)] = {xs...};
39 template<typename T, T... xs>
40 constexpr meta_array<T, xs...>
43 static_assert(sizeof...(xs) == 3, "What's wrong with you?");
44 return meta_array<T, xs...>();
51 const char (& xs)[3] = array_gen<decltype("123"_s)>::value;