Problem with class template specialisations
问题 I'm trying to port some code from VC9 to G++, however Ive run into a problem with template specialisations apparently not being allowed for class members. The following code is an example of these errors for the getValue specialisations of the class methods. In all cases the error is "error: explicit specialization in non-namespace scope class ... " template<typename T> T getValue(const_iterator key)const { try{return boost::lexical_cast<T>(key->second);} catch(boost::bad_lexical_cast &e) {