diff options
author | Jason Merrill <jason@redhat.com> | 2020-02-26 00:33:52 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-02-26 00:34:39 -0500 |
commit | 32988aac5be4fa472823e21d2d0eb877faca5667 (patch) | |
tree | 91eac30bbb83506d9b41319a3737eedcd8e2cc89 /gcc/cp/ChangeLog | |
parent | c93117eea148326a718ae1e413bc85f4fa257d8f (diff) | |
download | gcc-32988aac5be4fa472823e21d2d0eb877faca5667.zip gcc-32988aac5be4fa472823e21d2d0eb877faca5667.tar.gz gcc-32988aac5be4fa472823e21d2d0eb877faca5667.tar.bz2 |
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.
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r-- | gcc/cp/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1acd99f..260f38f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 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. + +2020-02-26 Jason Merrill <jason@redhat.com> + PR c++/90546 * call.c (build_user_type_conversion_1): Allow a template conversion returning an rvalue reference to bind directly to an lvalue. |