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

2024-04-18


905. Explicit defaulted copy constructors and trivial copyability

Section: Clause 11  [class]     Status: CD2     Submitter: Daveed Vandevoorde     Date: 27 May, 2009

[Voted into WP at March, 2010 meeting.]

It is presumably possible to declare a defaulted copy constructor to be explicit. Should that render a class not trivially copyable, even though the copy constructor is trivial? That is, does being “trivally copyable” mean that copy initialization, and not just direct initialization, is possible?

A related question is whether the specification of triviality should require that the copy constructor and copy assignment operator must be public. (With the advent of “=default” it is possible to make them non-public, which was not the case when these definitions were crafted.)

Proposed resolution (October, 2009):

This issues is resolved by the resolution of issue 906.