I have a problem with the specialization of the template, which boils down to the following snippet:
It compiles and works correctly, displaying 0.2 0.4 , in Cygwin g ++ 4.3.4, and also compiles in the Comau Online compiler . However, Visual Studio C ++ 2010 Express gives the following error message:
error C2910: 'Class::fun' : cannot be explicitly specialized error C2910: 'Class::fun' : cannot be explicitly specialized
EDIT: when I changed the function as a free function, the error message changed to
error C2912: explicit specialization; 'void fun<1>(double [],double (&)[2])' is not a specialization of a function template
So, two questions: 1. my code is finished C ++ 2. if so, is this a known issue with the Visual Studio C ++ 2010 compiler?
source share