Title
constexpr defaulted copy constructors
Status
c++11
Section
11.4.5.3 [class.copy.ctor]
Submitter
Jason Merrill

Created on 2010-10-25.00:00:00 last changed 122 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2010-11-15.00:00:00

Proposed resolution (November, 2010) [SUPERSEDED]:

Change 11.4.5.3 [class.copy.ctor] paragraph 14 as follows:

A copy/move constructor that is defaulted and not defined as deleted is implicitly defined if it is odr-used (6.3 [basic.def.odr]) to initialize an object of its class type from a copy of an object of its class type or of a class type derived from its class type123 or when it is explicitly defaulted after its first declaration. [Note: the copy/move constructor is implicitly defined even if the implementation elided its odr-use (6.3 [basic.def.odr], 6.7.7 [class.temporary]). —end note] If the implicitly-defined constructor would satisfy the requirements of a constexpr constructor (9.2.6 [dcl.constexpr]), the implicitly-defined constructor is constexpr.
Date: 2022-02-18.07:47:23

11.4.5 [class.ctor] allows for a defaulted default constructor to be constexpr, but 11.4.5.3 [class.copy.ctor] does not do the same for a defaulted copy constructor. This seems wrong.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3372
2011-04-10 00:00:00adminsetstatus: review -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3099
2010-10-25 00:00:00admincreate