Created on 2019-01-05.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4791.
Change [concept.same] as follows:
template<class T, class U> concept same-impl = // exposition only is_same_v<T, U>; template<class T, class U> concept Same =is_same_v<T, U>same-impl<T, U> && same-impl<U, T>;-1- [Note: Same<T, U> subsumes Same<U, T> and vice versa.—end note]
[ 2019-01-20 Reflector prioritization ]
Set Priority to and status to Tentatively Ready
The specification of the Same concept in [concept.same]:
template<class T, class U> concept Same = is_same_v<T, U>;-1- Same<T, U> subsumes Same<U, T> and vice versa.
seems contradictory. From the concept definition alone, it is not the case that Same<T, U> subsumes Same<U, T> nor vice versa. Paragraph 1 is trying to tell us that there's some magic that provides the stated subsumption relationship, but to a casual reader it appears to be a mis-annotated note. We should either add a note to explain what's actually happening here, or define the concept in such a way that it naturally provides the specified subsumption relationship.
Given that there's a straightforward library implementation of the symmetric subsumption idiom, the latter option seems preferable.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2019-02-26 17:40:23 | admin | set | status: voting -> wp |
2019-01-21 04:50:04 | admin | set | status: ready -> voting |
2019-01-20 16:20:00 | admin | set | messages: + msg10294 |
2019-01-20 16:20:00 | admin | set | status: new -> ready |
2019-01-05 19:14:04 | admin | set | messages: + msg10276 |
2019-01-05 00:00:00 | admin | create |