[LLVMbugs] [Bug 9482] New: Use of typedef for class template specialization in explicit member specialization across namespaces fails

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 14 20:45:28 PDT 2011


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

           Summary: Use of typedef for class template specialization in
                    explicit member specialization across namespaces fails
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I believe Clang intends to support typedef names in explicit specializations of
members, but that breaks when they cross namespaces:

% cat x.cc
namespace N1 {
  template <typename T> struct S {
    void foo() {}
  };
}

namespace N2 {
  typedef N1::S<int> X;
}

namespace N1 {
  template<> void N2::X::foo() {}
}

% ./bin/clang -fsyntax-only x.cc
x.cc:12:26: error: no function template matches function template
specialization 'foo'
  template<> void N2::X::foo() {}
                         ^
1 error generated.

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