DataArray and VecDataArray Compile Time Access to # of Component and Scalar Type
Many template classes provide using statements for types that are template arguments such that they can be used at compile time (forwarded into another template function, static assertion, constexpr if statement, other compile time uses). Atm there is no way to do this with VecDataArray # of components and scalar type. Which ARE known at compile time, but cannot be used.
Example of such a function:
template<int N>
static void whatWhatWhatttt()
{
for (int i = 0; i < N; i++)
{
printf("woof\n");
}
}
template<typename T>
static void fill(T& myDataArray,
typename T::ValueType initValue)
{
myDataArray.fill(initValue);
if constexpr(T::NumComponents == 5)
{
printf("blah\n");
}
whatWhatWhatttt<T::NumComponents>();
}
Edited by Andrew Wilson