I don't think this is possible (at least not as of c++11), but is there a function signature that can differentiate between a passed compile time constant (includes constexpr results that are calculated at compile time) and a variable?
I'm writing a library where this could be useful under some very specific cases and if I can infer these, then the library could save some CPU cycles, without the developer having to do the analysis themselves.