So I'm working on solution that has 2 projects (2 applications).
A few source files are being used by both applications.
One file is almost identical, except a few lines should be changed (boost::shared_from_this() instead of this; )
for project 1 I need:
project 2 needs:Code:return this;
Is this the right approach to put macro in front of this like:Code:return shared_from_this();
Is this the right way to solve that kind of problems?Code:#ifdef IS_MACRO_RETURN_THIS return this; #else return shared_from_this(); #endif
I havent faced with anything similar so far..
If so, where should I #define IS_MACRO_RETURN_THIS ? On top of main .cpp file?
If not, what would be the right way?