[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-04 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #11 from m.cencora at gmail dot com --- This is surprising to say the least because apparently for following code (where both conversion operators return same type) the compiler somehow correctly chooses && qualified overload:

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-03 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 Patrick Palka changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-03 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 Patrick Palka changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Assignee|unassigned

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-03 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org --- Comment

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #7 from GCC Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:1c522c9eafa5b86b78cd7b3044e120762fb4c879 commit r14-6899-g1c522c9eafa5b86b78cd7b3044e120762fb4c879 Author: Patrick Palka Date:

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-19 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #6 from Marek Polacek --- (In reply to m.cencora from comment #4) > This also might be a just another symptom of the same root cause: > > struct bar > { > bar() = default; > > bar(const bar&); > bar(bar&&); > >

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-19 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #5 from m.cencora at gmail dot com --- (In reply to m.cencora from comment #4) > This also might be a just another symptom of the same root cause: This one is actually a regression (worked on gcc 8.3 and older)

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-19 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #4 from m.cencora at gmail dot com --- This also might be a just another symptom of the same root cause: struct bar { bar() = default; bar(const bar&); bar(bar&&); bar& operator=(const bar&); bar&

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #2 from m.cencora at gmail dot com --- > When invoking the conversion operator the problem does not occur. When invoking the conversion operator *explicitly* the problem does not occur.

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #1 from m.cencora at gmail dot com --- Fixed sample (a typo in else branch of WORKAROUND2): struct no_copy { no_copy() = default; no_copy(const no_copy&) = delete; no_copy(no_copy&&); no_copy& operator=(const