I'd like to check during compile time if some function of some class is used/not used, and accordingly fail/pass the compilation process.
For example if function F1
is called somewhere in the code I want the compilation to succeed, and if function F2
is called I want it to fail.
Any ideas on how to do that, with usage of preprocessor, templates or any other c++ metaprogramming technique?