In this simplified code :
template <int... vars>
struct Compile_Time_Array_Indexes
{
static std::array < int, sizeof...(vars)> indexes;//automatically fill it base on sizeof...(vars)
};
template <int ... vars>
struct Compile_Time_Array :public Compile_Time_Array_Indexes<vars...>
{
};
I want to automatically fill indexes
base on the vars...
size .
Example :
Compile_Time_Array <1,3,5,2> arr1;//indexes --> [0,1,2,3]
Compile_Time_Array <8,5> arr2; // indexes --> [0,1]
Any idea ?