The errors C2950 and C3416 are, basically, the same:error C2950: cannot explicitly instantiate an explicit specializationerror C3416: an explicit specialization may not be explicitly instantiatedThe only difference is that the former happens with templates classes and the latter with template functions. The code in the "Steps to reproduce section" raises both of them. Nevertheless, this redundancy is not the main issue. Quoting 14.7.2/5: "For a given set of template parameters, if an explicit instantiation of a template appears after a declaration of an explicit specialization for that template, the explicit instantiation has no effect."It's worth mentioning that GCC 4.6.3 and Clang 3.1 compile the code with no issue.I reckon that the issue raised by C2950 and C3416 is important and developers might wanted to be warned abou it. My suggestion is turning the errors into a single (one code and one message) warning. In addition, because the standard says that explicit instantiating a specialization has "no effects", the warning should be turned off by default.
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...