You can use template and template specialization to do the job. For example:
template <typename T>
class CalcRunner;
template <>
class CalcRunner<naive_loop>
{
void loopFunction(void){...}
};
template <>
class CalcRunner<partially_unrolled_loop>
{
void loopFunction(void){...}
};
// Now instantiate what you wanna at compiler time
typename CalcRunner<partially_unrolled_loop> CalcRunner_t
int main()
{
CalcRunner_t runner;
runner.loopFunction();
}