David Lindauer wrote:
template <class T>
class myclass {
T a ;
#ifdef PREPROC_SYMBOL
T b;
#endif
} ;
at what point do the preprocessor statements get interpreted? When the
template is being compiled, or
when the template definition is being invoked?
The preprocessor, as his name says, is executed before compiling. In some
systems is executed as a separate program and his output is directed to the
"real" compiler. And even if the compiler does not work that way,
habitually a separate preprocessor is available just in case you need to
use it (cpp is a usual name for it).
Then, when the template is compiled, all preprocessing has been done before.
--
Salu2