------- Comment #5 from raychaudhuri_amitava at yahoo dot com 2010-07-10 18:45 ------- (In reply to comment #4) > The error message is not clear. The issue is that you are not using a > constant > expression for a template arugment. Template arguments are either constant > expressions or types. >
Whenever I will be using this kind of template in a class, the variable name is predefined. Now when I create an object and call the function, it will get the address offset and thus should be able to create an instance of that function with same prototype but different body, else for such cases we have to create different functions for each member. Can it be a new feature in g++ compiler? This will make function and objects as first class citizen in C++. We can create function at runtime with different object embedded in it. (I know it can be done by #define, but this is a better way I think.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44906