Created on 2018-07-07.00:00:00 last changed 43 months ago
Proposed resolution:
This wording is relative to N4849.
Change [concept.copyconstructible] as indicated:
template<class T> concept copy_constructible = move_constructible<T> && constructible_from<T, T&> && convertible_to<T&, T> && constructible_from<T, const T&> && convertible_to<const T&, T> && constructible_from<T, const T> && convertible_to<const T, T>;-1- If T is an object type, then let v be an lvalue of type (possibly const) T or an rvalue of type const T. T models copy_constructible only if
(1.1) — After the definition T u = v;, u is equal to v ([concepts.equality]) and v is not modified.
(1.2) — T(v) is equal to v and does not modify v.
[ 2020-02 Status to Immediate on Thursday night in Prague. ]
[ 2020-02-13 Per LWG review, Casey provides updated P/R wording. ]
[ 2018-11 Reflector prioritization ]
Set Priority to 2
Previous resolution: [SUPERSEDED]This wording is relative to N4762.
Change [concept.copyconstructible] as indicated:
template<class T> concept CopyConstructible = MoveConstructible<T> && Constructible<T, T&> && ConvertibleTo<T&, T> && Constructible<T, const T&> && ConvertibleTo<const T&, T> && Constructible<T, const T> && ConvertibleTo<const T, T>;-1- If T is an object type, then let v be an lvalue of type (possibly const) T or an rvalue of type const T. CopyConstructible<T> is satisfied only if
(1.1) — After the definition T u = v;, u is equal to v and v is unmodified.
(1.2) — T(v) is equal to v and does not modify v.
The design intent of the CopyConstructible concept has always been that the source of the constructions it requires be left unmodified. Before P0541R1 reformulated the Constructible concept in terms of is_constructible, the wording which is now in [concepts.equality]/5:
This document uses a notational convention to specify which expressions declared in a requires-expression modify which inputs: except where otherwise specified, […] Operands that are constant lvalues or rvalues are required to not be modified.indirectly enforced that requirement. Unfortunately, nothing in the current wording in [concept.copyconstructible] enforces that requirement.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 09:37:04 | admin | set | messages: + msg11105 |
2020-02-14 09:37:04 | admin | set | status: new -> immediate |
2020-02-13 19:13:44 | admin | set | messages: + msg11081 |
2018-11-27 04:34:19 | admin | set | messages: + msg10234 |
2018-07-11 01:39:39 | admin | set | messages: + msg10026 |
2018-07-07 00:00:00 | admin | create |