This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15817] New: Fails to invoke constructor; uses default copy constructor instead


The declaration at testPowerset.cc:67 should (but does not) invoke the constructor declared at powerset.hh:399 and defined at powerset.hh:654, as shown by the failure to report an error on "this->ShouldBeAnError();" at powerset.hh:664. Instead it uses a compiler-generated copy constructor.

Note that in the invocation the template arguments A2 and Alloc are the same, so the invocation is actually: "Powerset<short, StdAllocator(const Powerset<short, Stdallocator>&, const StdAllocator&)" which matches the declaration.

Ivan

-- 
           Summary: Fails to invoke constructor; uses default copy
                    constructor instead
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]