ох, ребята, ну как так? оказывается, в constexpr функциях нельзя объявить static constexpr переменную :(
here is workaround
template <int... Ns>
struct Table
{
static constexpr int data[] = {Ns...};
static constexpr int get(int x)
{
return data[x];
}
};
constexpr int g (int x)
{
using table = Table<1,2,3,4,5,6,7,8,9,10>;
return table::get(x);
}