Title
Copy constructors and cv-qualifiers
Status
nad
Section
11.4.5.3 [class.copy.ctor]
Submitter
Jack Rouse

Created on 1999-05-04.00:00:00 last changed 161 months ago

Messages

Date: 2011-08-15.00:00:00

Rationale (August, 2011):

These concerns have been addressed by other changes.

Date: 2006-11-15.00:00:00

Proposed Resolution (November, 2006):

This issue is resolved by the proposed resolution for issue 535.

Date: 2022-02-18.07:47:23

Jack Rouse: In 11.4.5.3 [class.copy.ctor] paragraph 8, the standard includes the following about the copying of class subobjects in such a constructor:

  • if the subobject is of class type, the copy constructor for the class is used;
But there can be multiple copy constructors declared by the user with differing cv-qualifiers on the source parameter. I would assume overload resolution would be used in such cases. If so then the passage above seems insufficient.

Mike Miller: I'm more concerned about 11.4.5.3 [class.copy.ctor] paragraph 7, which lists the situations in which an implicitly-defined copy constructor can render a program ill-formed. Inaccessible and ambiguous copy constructors are listed, but not a copy constructor with a cv-qualification mismatch. These two paragraphs taken together could be read as requiring the calling of a copy constructor with a non-const reference parameter for a const data member.

History
Date User Action Args
2011-09-06 00:00:00adminsetmessages: + msg3581
2011-09-06 00:00:00adminsetstatus: review -> nad
2008-02-03 00:00:00adminsetmessages: + msg1565
2008-02-03 00:00:00adminsetstatus: open -> review
1999-05-04 00:00:00admincreate