[LLVMbugs] [Bug 13738] New: MS compatibility: explicit specializations can be declared in any namespace

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 31 07:03:56 PDT 2012


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

             Bug #: 13738
           Summary: MS compatibility: explicit specializations can be
                    declared in any namespace
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: avakar at ratatanek.cz
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


vs10 will compile the following without errors, even when language extensions
are disabled.

    namespace A {
        template <typename T>
        class X;
    }

    namespace B {
        template <>
        class A::X<int>;
    }

clang correctly outputs

    error: class template specialization of 'X' must originally be declared in
namespace 'A'

The diagnostic should be suppressed when -fms-compatibility is in effect.

-- 
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.



More information about the llvm-bugs mailing list