Stunt programming. Modern C++ is not about that.

Option Three

Sobering time.

Cold head.  May I remind you we all know very well about the good old Function Object aka “Functor”?

So let’s do a proverbial step back and use what we already know. Bellow is a very bland-looking very traditional C++ solution.  I am not sure but perhaps even the C++98 compiler could produce a decent byte code from this?

Testing begins here

I think this is one sober solution indeed. And working too. Usage seems simple and with no surprises.

Also, the default argument issue is solved in the C++ way. Modern or not. By using () operator overload, on the class.

What also is delivered is correct behavior in case of const required.  Code above is documented. And easy to maintain, expand or do whatever might be required down the line.