This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15817] New: Fails to invoke constructor; uses default copy constructor instead
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2004 04:32:06 -0000
- Subject: [Bug c++/15817] New: Fails to invoke constructor; uses default copy constructor instead
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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