[LLVMbugs] [Bug 9916] New: link-time undefined copy constructor when defaulting

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 14 07:15:32 PDT 2011


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

           Summary: link-time undefined copy constructor when defaulting
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hhinnant at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I know this area is still under active development.  Just hoping to help with
tests.

The defaulted default constructor appears to be working well.  But I get a link
time error for the copy constructor:

Undefined symbols for architecture x86_64:
  "A::A(A const&)", referenced from:
      _main in cc-y6wi0g.o
ld: symbol(s) not found for architecture x86_64

class A
{
public:
    A() = default;
    A(const A&) = default;
};

int main()
{
    A a;
    A a2 = a;
}

Apple clang version 3.0 (trunk 131335) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.7.0
Thread model: posix

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