I have a header file in where I store various typedefs. The problem is that I need to pass a variable from a source file to one of those typedefs.
I have tried this:
extern const unsigned int number;
typedef Storage<double,number> store;
in the header file.
Then in the source file, the number variable is instantiated at execution time:
const unsigned int number( conf->ReadNumber() );
However, it does not work.
Is this thing possible? Any idea?
Storage<double,number>wait fornumberto be a constant expression : It’s value must be computable at compile time.