2 ms·
For this particular example it'd be even easier to just put 'int foo(kind k, int x)' in the header so it's inlined & optimized at each call site anyway. Slap a
by kllrnohj 7y ago
For this particular example it'd be even easier to just put 'int foo(kind k, int x)' in the header so it's inlined & optimized at each call site anyway. Slap a constexpr on it so the compiler even yells at you if it can't resolve it at compile time for some reason.