Created on 2011-12-08.00:00:00 last changed 101 months ago
Rationale (February, 2012):
This is a request to extend the language and is thus more appropriately considered by EWG.
The current wording of 11.4.2 [dcl.fct.def.default] paragraph 1 allows copy constructors and copy assignment operators to have a reference to non-const parameter, even if the implicitly-declared function would have had a reference to const parameter. This is safe because the sub-object copy functions that take a reference to const parameter can be invoked with a non-const lvalue.
It would also be possible to allow the inverse situation — permitting the defaulted function to be defined with a reference to const parameter, even though the sub-object functions have a reference to non-const parameter — by defining the defaulted function as deleted.
See also issue 1331.
|2012-02-27 00:00:00||admin||set||messages: + msg3864|
|2012-02-27 00:00:00||admin||set||status: open -> extension|