Created on 2012-09-15.00:00:00 last changed 146 months ago
Additional note (September, 2012):
The default arguments of an elided constructor can also have side effects and should be mentioned, as well; however, the elision should not change the odr-use status of functions and variables appearing in those default arguments.
The current wording of 11.4.5.3 [class.copy.ctor] paragraph 31 refers only to constructors and destructors:
When certain criteria are met, an implementation is allowed to omit the copy/move construction of a class object, even if the constructor selected for the copy/move operation and/or the destructor for the object have side effects.
However, in some cases (e.g., auto_ptr) a conversion function is also involved in the copying, and it could presumably also have visible side effects that would be eliminated by copy elision. (Some additional contexts that may also require changes in this regard are mentioned in the resolution of issue 535.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2012-11-03 00:00:00 | admin | set | messages: + msg4101 |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-09-15 00:00:00 | admin | create |