@cyberpunk_ is trying to achieve something and made some questions about it but all the chase boils down to this:
Is it possible to build a tool to enforce compile-ti
Use std::integral_constant:
std::integral_constant
int x = std::integral_constant::value; f(std::integral_constant::value);
This code will not compile if g(n) is not evaluated at compile-time.