[Bug c++/96501] [C++11] Should warn when classes only have copy constructor defined
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 6 16:44:22 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96501
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Nuno Lopes from comment #0)
> I see a lot of old code that has copy constructors defined, but not move
> constructors. This pessimizes code since the definition of the copy
> constructor hides the default move constructor.
If you need a user-defined copy constructor, a defaulted move constructor
probably isn't going to do the right thing anyway.
More information about the Gcc-bugs
mailing list