Is it possible to create a static const array with values from template parameter pack?
I tried the following code, but gcc 4.8.1 gives "error: parameter packs not expanded"
template<int... N>
struct ARRAY_OF_DIMS
{
static constexpr size_t NDIM = sizeof...(N);
static const int DIMS[NDIM];
};
template<int... N>
const int ARRAY_OF_DIMS<N>::DIMS[ARRAY_OF_DIMS<N>::NDIM] = { N... };