[LLVMbugs] [Bug 9965] New: default constructor not emitted for templated class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 20 03:11:16 PDT 2011


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

           Summary: default constructor not emitted for templated class
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following code fails to link, when compiled with -std=gnu++0x. The problem
is that the constructor for X is not emitted.

Removing the template from X, or replacing X's constructor with: X() = {}, or
leaving the default one, fixes the problem.




template<typename T>
struct X
{
  X() = default;
};


int main(void)
{ X<int> l; }

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