http://llvm.org/bugs/show_bug.cgi?id=8450

Douglas Gregor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Douglas Gregor <[email protected]> 2010-10-25 13:11:51 CDT 
---
Clang is correct here in diagnosing C++ [temp.expl.spec]p6:

  If a template, a member template or the member of a class template is
explicitly specialized then that specialization shall be declared before the
first use of that specialization that would cause an implicit instantiation to
take place, in every translation unit in which such a use occurs; no diagnostic
is required.

g++'s behavior is also acceptable according to the standard ("no diagnostic is
required). MSVC is wrong to reject the code in the WORKAROUND block, per C++
[temp.expl.spec]p13:

  An explicit specialization of a static data member of a template is a
definition if the declaration includes an initializer; otherwise, it is a
declaration.

It's probably treating the explicit specialization as a definition rather than
a declaration.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to