Presently, Microsoft's extern template implementation is still warned as an extension, as described in bug ID 559546. The resolution to that bug says it will no longer be marked as a warning in the next version. However, the current implementation does not appear to be fully compatible with the C++0x draft standard.Error C2929 states that you cannot explicitly instantiate a template in the same translation unit where you marked it as extern. However, the draft standard I have seen states:"If an entity is the subject of both an explicit instantiation declaration and an explicit instantiation definition in the same translation unit, the definition shall follow the declaration.An entity that is the subject of an explicit instantiation declaration and that is also used in the translation unit shall be the subject of an explicit instantiation definition somewhere in the program; otherwise the program is ill-formed, no diagnostic required."This would mean that C2929 should not be an error. Indeed, the fact that C2929 ever existed is curious, since it is contrary to the normal extern concept as it applies to global variables.This is a significant issue since it greatly complicates the usage of the extern template feature if you either (a) cannot put extern template declarations in header files or (b) must ensure you do not #include the header with the declaration in the source file where those templates are explicitly instantiated.
Visual Studio/Silverlight/Tooling version
What category (if any) best represents this feedback?
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results