[Bug c++/89700] Warn if move constructor is not generated and not deleted

2021-10-26 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2021-05-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 Jonathan Wakely changed: What|Removed |Added CC||nunoplopes at sapo dot pt --- Comment

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2021-05-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Severity|normal

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-25 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 --- Comment #6 from Antony Polukhin --- Another way to workaround the warning is to use something like `my_class(my_class&) requires false;`. That's too ugly to use. I'd be fine with closing this issue as a 'won't fix'.

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 --- Comment #5 from Jonathan Wakely --- No, because that would mean almost every class written for C++03 would fail to compile in C++11 or later, which would be absurd.

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-14 Thread cerevra at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 --- Comment #4 from Igor Klevanets --- (In reply to Jonathan Wakely from comment #3) > X x2 = std::move(x1); // calls copy constructor Excuse me. I was sure that standard tells this row to fail compitaion

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 --- Comment #3 from Jonathan Wakely --- You're mistaken. struct X { std::string str = "not empty"; X() = default; X(const X&) = default; }; This type does not have a move constructor. Copying an rvalue will perform a copy (not a move):

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-13 Thread cerevra at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 Igor Klevanets changed: What|Removed |Added CC||cerevra at yandex dot ru --- Comment #2

[Bug c++/89700] Warn if move constructor is not generated and not deleted

2019-03-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89700 --- Comment #1 from Jonathan Wakely --- (In reply to Antony Polukhin from comment #0) > The rules for the warning could be following: > Issue a warning if at least one of the class members has a move constructor, > class has a copy constructor an