
AMDG Lorenzo Caminiti wrote:
Why would it matter if the function is compiled before or after the class? The preprocessor will expand the counter value to 1 after PP_UPDATE_COUNTER() at preprocessing time thus regardless of which order the preprocessed code will actually be compiled.
If the compiler handled the functions as they were defined, there's a semi-portable ADL hack that would work.
However, this approach will not work for me because the #include cannot be programmed within the macro. Therefore, I will have to rely on the macro callers to explicitly indicate if they are calling the macro by using the #include...
Is there a way I can do this without using #instructions programmed outside the macro definition?
No there isn't. In Christ, Steven Watanabe