[LLVMbugs] [Bug 12438] New: clang++ rejects out-of-line definitions containing sizeof...(T)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 2 08:51:56 PDT 2012


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

             Bug #: 12438
           Summary: clang++ rejects out-of-line definitions containing
                    sizeof...(T)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: llvm-bugs at quasiparticle.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


clang++ rejects out-of-line definitions of methods whose declaration includes
sizeof...(T) with T a template argument pack.

Take the following code:

template<class... T>
struct X {
  template<int i>
  enable_if<sizeof...(T)> foo();
};

template<class... T>
template<int i>
enable_if<sizeof...(T)> X<T...>::foo() {}

clang++ rejects this with

error: out-of-line definition of 'foo' does not match any declaration in
'X<T...>'

The same thing appears to happen with any out-of-line definition using the
sizeof... operator.

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