Created on 2018-04-10.00:00:00 last changed 3 months ago
Proposed resolution:
This wording is relative to N4741.
- In [meta.unary.prop] Table 42, change the Precondition text for is_assignable, is_trivially_assignable, and is_nothrow_assignable as follows:
remove_cvref_t<T> and remove_cvref_t<U> shall be complete types,cvvoid, or arrays of unknown bound.- In [meta.unary.prop] Table 42, change the Precondition text for is_copy_assignable, is_move_assignable, is_trivially_copy_assignable, is_trivially_move_assignable, is_nothrow_copy_assignable, and is_nothrow_move_assignable as follows:
remove_cvref_t<T> shall be a complete type,cvvoid, or an array of unknown bound.
[ 2023-06-12; Varna ]
P1285R0 is related to this issue.
[ 2020-02-14, Prague ]
LWG discussions. Set priority to 2.
LWG 2939 suggests that the the preconditions of the type traits need reevaluation. This issue focuses specifically on is_assignable and, by extension, its variants:
We note a discrepancy: is_copy_assignable<T> requires T to be a complete type, but the equivalent form is_assignable<T&, const T&> does not. The requirement for is_copy_assignable<T> seems sensible, since there's no way to determine whether or not the assignment declval<T&>() = declval<const T&>() is well-formed when T is incomplete. It seems that the same argument should apply to all of the above "assignable" traits, and that they must require that the referent type is complete when given a reference type parameter to be implementable.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-06-12 11:59:23 | admin | set | messages: + msg13621 |
2020-02-14 15:49:31 | admin | set | messages: + msg11130 |
2018-08-22 12:55:05 | admin | set | messages: + msg10096 |
2018-04-10 20:38:51 | admin | set | messages: + msg9815 |
2018-04-10 00:00:00 | admin | create |