Sorry for my long summary text!
Please, look at the following C++ code:

//---------- start of the code

class A
{
    public : A (int i) { }
    private: A (const A& a) { }
};

int main (int argc, char* argv[])
{
    // ERROR: How could i use the auto keyword which exist in GCC 4.4
    auto a1 = A (5);

    // ERROR: Why? Is it logically false? Really i don't know.
    A a2[3] = { A (0), A (1), A (2) };
}

//---------- end of the code

All problems will begin, When the copy constructor is private.


-- 
           Summary: The copy constructor is not needed but GCC (C++) don't
                    let me to initialize my object instance!
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: MSHojatoleslami at Gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40655

Reply via email to