Specialize function by argument values known at compile time in C++
I have some function with 2 arguments: distance and radius float expensive_function(float distance, float radius) { return distance + radius; } The whole project only uses 2 different radiuses and they both are known at compile time (1.2f and 3.4f). Is there a way to specialize this function knowing that? I would like something like