[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-09-19 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-09-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #8 from GCC Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:a2746e4347076ea48f4aeb28e13e6337ff7799ad commit r15-3721-ga2746e4347076ea48f4aeb28e13e6337ff7799ad Author: Marek Polacek Date: Mo

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-09-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #7 from Marek Polacek --- I have a patch implementing the clang++ behavior, that is, warning by default in C++20: 116162.C:3:4: warning: explicitly defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-08-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #6 from Jakub Jelinek --- Albuquerque 2017 doesn't mention it was a DR when voted in, so yes, C++20 or later I guess.

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-08-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #5 from Jakub Jelinek --- Not really sure if this paper was a DR or not. Seems clang rejects this for -std=c++17 and earlier and accepts with a warning for -std=c++20 and later, what we probably should do is silently make it deleted

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-08-01 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Assignee|unassigned

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-07-31 Thread jlame646 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #4 from Jason Liam --- Yes, this is well-formed because the move ctor here is deleted as per 2.6 as explained in this thread: https://stackoverflow.com/a/78817438/12002570 In C++26, constructors have types through CWG2479 which is D

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-07-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 Jakub Jelinek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-07-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 --- Comment #2 from Jakub Jelinek --- Or do you mean instead of error it should be just defined as deleted perhaps with warning per https://eel.is/c++draft/dcl.fct.def#default-2.6 ? In that case, I think clang implements it correctly and while

[Bug c++/116162] GCC rejects explicitly default move ctor with const X&& parameter

2024-07-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116162 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1