This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 113d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-03-20


910. Move constructors and implicitly-declared copy constructors

Section: 11.4.5.3  [class.copy.ctor]     Status: CD2     Submitter: Daveed Vandevoorde     Date: 4 June, 2009

[Voted into WP at March, 2010 meeting as document N3053.]

A constructor of the form T::T(T&&) is a candidate function for copy construction; however, the declaration of such a constructor does not inhibit the implicit declaration and definition of a copy constructor. This can lead to surprising results. We should consider suppressing the implicit copy constructor if a move constructor is declared.