Variadic template class: Allow for float and int arguments cast to float?
I have the following class: template <size_t N, float... Lam> requires (sizeof...(Lam) == N) class Spectrum { public: Spectrum() : wavelengths{ static_cast<float>(Lam)... } { values.fill(0.f); }; template <IsNumeric T> Spectrum(T v) : wavelengths{ static_cast<float>(Lam)... } { values.fill(static_cast<float>(v)); }; template <IsNumeric... T> requires (sizeof...(T) == N) Spectrum(T... v) : wavelengths{ static_cast<float>(Lam)... }, values { static_cast<float>(v)... }