It isn't something you can do with templates pre se, you'll have to generate the function with a macro.
Last edited on
@SIK: Line 16 is not valid syntax.
@SIK: that's still not valid syntax - you can't use the constructor there. Also you used single colons instead of double colons for
std::string.
http://ideone.com/hylK76
Please take the time to at least test your code, or warn that it is untested.
Last edited on
Why do you need to get the name of the class?