Hello All,
I'm trying to figure out if it is possible to use the preprocessor
library to generate a unique token for
a given translational unit suitable for use in a variable definition.
__FILE__ doesn't work for obvious reasons.
The motivation is use the template below to generate a unique function
scope static "verbosity" for each translation unit.
The extern is necessary to give the non-type template par external
linkage but also requires a unique variable name.
thanks for any help.
-Sean
#define INIT_VERBOSITY extern const char
BOOST_PP_CAT(file,UNIQUE_TOKEN)[] filename = __FILE__;
#define VERBOSITY VerbosityLookup