I have:
char* byteN = "BYTE";
char* byte_fun()
{
return type_fun< byteN>();
}
char* fix_fun()
{
return type_fun< "FIX">();
}
I the first case, the compiler says:
basic_fun.cpp:490: `lib::byteN' is not a valid template argument
basic_fun.cpp:490: it must be the address of an object with external
linkage
basic_fun.cpp:490: no matching function for call to `type_fun()'
but I think it HAS external linkage, hasn't it?
In the second case the compiler says:
basic_fun.cpp:494: string literal "FIX" is not a valid template argument
because it is the address of an object with static linkage
So why this has to be?
Any suggestions how to do it?
thanks,
marc