I am getting weird error when I call a template func with const argument from within a member function. The same function with same const argument works fine from within normal function!!! Here is sample
***********ClassA.h **********
template< typename T, std::size_t N > inline std::size_t size( T(&)[N] ) { return N ;}
class classA{
classA();
static const std::string units[];
}
When I compile the above code I get error - error C2893: Failed to specialize function template size(T (&)[N]) With the following template arguments: 'const std::string'
Can anyone please suggest why this might be happening.