[Bug c++/44158] [C++0x] wrong overload resolution for copy-initialization from an rvalue

jason at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun May 16 22:32:00 GMT 2010



------- Comment #6 from jason at gcc dot gnu dot org  2010-05-16 22:32 -------
(In reply to comment #1)
> The rules say that for copy-initialization where the source type (X&&) is not
> the same as the destination type (X) a temporary is created.

But the source type is X; there are no expressions of reference type.

The problem is not the overload resolution, but that build_over_call looks at
TYPE_HAS_COMPLEX_INIT_REF even though we're dealing with the move ctor, not the
copy ctor.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-16 22:32:43
               date|                            |


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



More information about the Gcc-bugs mailing list