This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33235] New: C++0x overloading problem with move constructor and trivial copy constructor
- From: "dgregor at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2007 16:16:08 -0000
- Subject: [Bug c++/33235] New: C++0x overloading problem with move constructor and trivial copy constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Overload resolution is picking the wrong candidate for the construction of b3,
below:
base2 b3(static_cast<base2&&>(b));
Instead of choosing the move constructor, it is picking the trivial copy
constructor. However, adding a normal copy constructor fixes the problem.
Naturally, this only occurs in C++0x mode.
--
Summary: C++0x overloading problem with move constructor and
trivial copy constructor
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dgregor at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33235