M
marco_segurini
Hi,
I like to know if this is a good way to remove 'line 18' from
compilation when DBG is not defined (I dislike to wrap 'line 18' using
#if/#endif pair) of if there are better ways (always using the
namespace).
Am I sure that the compiler generates non code for 'line 18'?
/////////////////////////
//#define DBG
namespace MY_NAMESPACE
{
#if defined(DBG)
void MY_DUMP(int)
{
}
#else // release case
int pippo;
#define MY_DUMP(a) pippo
#endif
}
int main()
{
MY_NAMESPACE::MY_DUMP(1); // line 18
return 0;
}
////////////////////////
Thanks a lot.
Marco.
I like to know if this is a good way to remove 'line 18' from
compilation when DBG is not defined (I dislike to wrap 'line 18' using
#if/#endif pair) of if there are better ways (always using the
namespace).
Am I sure that the compiler generates non code for 'line 18'?
/////////////////////////
//#define DBG
namespace MY_NAMESPACE
{
#if defined(DBG)
void MY_DUMP(int)
{
}
#else // release case
int pippo;
#define MY_DUMP(a) pippo
#endif
}
int main()
{
MY_NAMESPACE::MY_DUMP(1); // line 18
return 0;
}
////////////////////////
Thanks a lot.
Marco.