It has nothing to do with templates.
value
is an instance member, and can only be accessed when you provide an instance of C
. A static function has no this
instance, and you haven't used the .
or ->
member access operator either to explicitly provide an instance.
manpreet
Best Answer
2 years ago
I am still learning C++ templates, and have encountered a problem regarding calling members from specialized static functions using the following. GCC complains: "invalid use of member C< const char* >::value in static member function." I have searched this forum and a few others, and even my friend Google cannot aid me. I figure the error has to be something I am overlooking, as I made a non-specialized version of the class (with the same static member function), and I still get the same error. Any ideas?
Many thanks to any insight you can offer.