Created on 2011-06-21.00:00:00 last changed 131 months ago
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Proposed resolution (August, 2011):
Change 9.5.2 [dcl.fct.def.default] paragraph 2 as follows:
...If a function is explicitly defaulted on its first declaration,
...
in the case of a copy constructor, move constructor, copy assignment operator, or move assignment operator, it shall have the same parameter type as if it had been implicitly declared.
Change 11.4.5.3 [class.copy.ctor] paragraph 12 as follows:
A copy/move constructor for class X is trivial if it is not user-provided, its declared parameter type is the same as if it had been implicitly declared, and if...
Change 11.4.5.3 [class.copy.ctor] paragraph 25 as follows:
A copy/move assignment operator for class X is trivial if it is not user-provided, its declared parameter type is the same as if it had been implicitly declared, and if...
Paragraph 1 of 9.5.2 [dcl.fct.def.default] allows an explicitly-defaulted copy constructor or copy assignment operator to have a parameter type that is a reference to non-const, even if the corresponding implicitly-declared function would have a reference to const. However, paragraph 2 says that a copy constructor or copy assignment operator that is defaulted on its first declaration, the parameter type must be exactly the same. Is there a good reason for the stricter rule for a function that is defaulted on its first declaration?
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2012-11-03 00:00:00 | admin | set | status: dr -> drwp |
2012-09-24 00:00:00 | admin | set | messages: + msg4005 |
2012-02-27 00:00:00 | admin | set | messages: + msg3812 |
2012-02-27 00:00:00 | admin | set | status: ready -> dr |
2011-06-21 00:00:00 | admin | create |