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

           Summary: Cannot initialize array in copy constructor
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Clang cannot compile the following code:

#include <iostream>

class Test {
  public:
    Test(const Test& other);
  private:
    std::string fString[4];
};

Test::Test(const Test& other) : fString(other.fString)
{
}

============

array.cpp:11:33: error: array initializer must be an initializer list
Test::Test(const Test& other) : fString(other.fString)
                                ^

... but g++ (4.4.x) compiles it. Is this clang bug?

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to