[Bug c++/86521] [8 Regression] GCC 8 selects incorrect overload of ref-qualified conversion operator template
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 05:38:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:32988aac5be4fa472823e21d2d0eb877faca5667
commit r8-10080-g32988aac5be4fa472823e21d2d0eb877faca5667
Author: Jason Merrill <jason@redhat.com>
Date: Wed Feb 26 00:33:52 2020 -0500
PR c++/86521 - C++17 copy elision in initialization by constructor.
This is an overlooked case in C++17 mandatory copy elision: We want
overload
resolution to reflect that initializing an object from a prvalue does not
involve a copy or move constructor even when [over.match.ctor] says that
only constructors are candidates. Here I implement that by looking through
the copy/move constructor in joust.
gcc/cp/ChangeLog
2020-02-26 Jason Merrill <jason@redhat.com>
PR c++/86521 - C++17 copy elision in initialization by constructor.
* call.c (joust_maybe_elide_copy): New.
(joust): Call it.
More information about the Gcc-bugs
mailing list