[LLVMbugs] [Bug 9877] New: cannot define member of explicitly specialized member class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 9 07:51:40 PDT 2011


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

           Summary: cannot define member of explicitly specialized member
                    class
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zilla at kayari.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


template<int>
struct X
{
    struct Y;
};

template<> struct X<0>::Y { static const int Z = 1; };

const int X<0>::Y::Z;

This is well-formed, see [temp.expl.spec]/5 and the accompanying example
(modified by core DR 531, see N3262)

The definition is also rejected with "template<>" (which is correct):
  template<> const int X<0>::Y::Z;
so there seems to be no way to provide a definition of X<0>::Y::Z

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