Title
Can a class with a constexpr copy constructor be a literal type?
Status
nad
Section
6.8 [basic.types]
Submitter
Jens Maurer

Created on 2007-08-09.00:00:00 last changed 200 months ago

Messages

Date: 2008-06-15.00:00:00

Rationale (June, 2008):

A copy constructor takes a reference as its first parameter, thus no user-declared copy constructor can be constexpr.

Date: 2022-11-20.07:54:16

6.8 [basic.types] paragraph 11 requires that a class type have a trivial copy constructor in order to be classified as a literal type. This seems overly restrictive; presumably having a constexpr copy constructor would suffice. (Note that a trivial copy constructor is a constexpr constructor according to 9.2.6 [dcl.constexpr] paragraph 4.)

History
Date User Action Args
2008-06-29 00:00:00adminsetstatus: review -> nad
2008-05-18 00:00:00adminsetmessages: + msg1649
2008-05-18 00:00:00adminsetstatus: open -> review
2008-03-17 00:00:00adminsetstatus: drafting -> open
2007-10-09 00:00:00adminsetstatus: open -> drafting
2007-08-09 00:00:00admincreate