This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
2171. Triviality of copy constructor with less-qualified parameterSection: 11.4.5.3 [class.copy.ctor] Status: CD4 Submitter: Jason Merrill Date: 2015-09-14[Adopted at the June, 2016 meeting.]
Issue 1333 says that a defaulted copy constructor with a less-const-qualified parameter type than the implicit declaration is non-trivial. This is inconsistent with the usual pattern that whether a special member function is callable is separate from whether it is trivial; the different declaration only affects whether you can call it with a const argument, it doesn't affect the operations involved. Should this outcome be reconsidered?
Proposed resolution (April, 2016):
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 parameter-type-list is equivalent to the parameter-type-list of an implicit declaration, 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 parameter-type-list is equivalent to the parameter-type-list of an implicit declaration, and if...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4