Is there a more elegant solution (to a hopefully obvious problem) than
switch(variableInt)
{
case 0: tmpl<0>::foo(); break;
case 1: tmpl<1>::foo(); break;
// up to, say, 10
}
Clearly, this can only be defined in some range. I only found old topics around this, maybe some nice C++17 or C++20 feature that helps us out here?