Title
const mismatch with defaulted copy constructor
Status
cd5
Section
9.5.2 [dcl.fct.def.default]
Submitter
Daniel Kr├╝gler

Created on 2011-06-15.00:00:00 last changed 2 weeks ago

Messages

Date: 2011-08-15.00:00:00

Rationale (August, 2011):

Possible resolutions to this issue need to be considered in a wider context, so it is more appropriate for the Evolution Working Group.

Date: 2017-11-15.00:00:00

[Adopted at the November, 2017 meeting as part of paper P0641R2.]

The current requirements of 9.5.2 [dcl.fct.def.default] paragraph 1 state that a defaulted copy constructor or copy assignment operator can have a reference to const parameter only if all its subobjects have corresponding functions with a reference to const parameter, even if that function is never called. This prevents some useful template classes.

(See also library issue 2068.)

See also issue 1426.

History
Date User Action Args
2021-02-17 00:00:00adminsetstatus: extension -> cd5
2012-09-24 00:00:00adminsetmessages: + msg4038
2011-06-15 00:00:00admincreate