C++ PATCH for c++/59823 (wrong overload resolution)/DR 1138

Jason Merrill jason@redhat.com
Tue Jan 28 04:25:00 GMT 2014


In the original testcase we were failing to prefer the copy assignment 
(which can take the result of the conversion operator directly) to a 
copy constructor followed by move assignment.  The best way to fix this 
was to make the latter ill-formed, as it is supposed to be under DR 
1138: just as you can't bind an rvalue reference to an lvalue variable, 
you can't bind it to the lvalue result of a conversion op either.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59823.patch
Type: text/x-patch
Size: 3359 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140128/4c292b2e/attachment.bin>


More information about the Gcc-patches mailing list