[LLVMbugs] [Bug 13524] New: Templated definition of static member with variadic template specialization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 4 11:33:30 PDT 2012


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

             Bug #: 13524
           Summary: Templated definition of static member with variadic
                    template specialization
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: klemensbaum at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8998
  --> http://llvm.org/bugs/attachment.cgi?id=8998
Small test case

Clang doesn't accept the attached code, GCC does.

$ clang --version
clang version 3.2 (trunk)
Target: x86_64-pc-linux-gnu
Thread model: posix

$ clang --std=c++0x test.cpp 
test.cpp:16:74: error: nested name specifier 'foo<T>::template bar<typename
foo<T>::bar<V...> >::' for declaration does not refer into a class, class
      template or class template partial specialization
constexpr int foo<T>::template bar<typename foo<T>::template bar<V...>>::error;
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 error generated.

$ g++ --version
g++ (Gentoo 4.7.1 p1.0, pie-0.5.3) 4.7.1

$ g++ --std=c++0x test.cpp 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../lib64/crt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

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