Created on 2014-06-20.00:00:00 last changed 79 months ago
[ LEWG Kona 2017 ]
Recommend NAD: We've done a lot of work getting the C++17 semantics we want in this area; we're not going to change them 3 days from DIS or change the TSv2 behavior to be different from '17.
[ 2016-11-08, Issaquah ]
Not adopted during NB comment resolution
[ 2015-02 Cologne ]
VV, DK, JY discuss why and when LessThanComparable was removed. AM: Move to LEWG. Please tell LWG when you look at it.
Addresses: fund.ts.v2
Currently, std::experimental::optional::operator== imposes the EqualityComparable requirement which provides two guarantees: It ensures that operator!= can rely on the equivalence-relation property and more importantly, that the BooleanTestable requirements suggested by issue 2114 are automatically implied.
std::experimental::optional::operator< doesn't provide a LessThanComparable requirement, but there was quite an historic set of changes involved with that family of types: As of N3527 this operator was defined in terms of operator< of the contained type T and imposed the LessThanComparable requirement. In the final acceptance step of optional by the committee, the definition was expressed in terms of std::less and the LessThanComparable requirement had been removed. The inconsistency between operator== and operator< should be removed. One possible course of action would be to add the LessThanComparable to std::experimental::optional::operator<. The EqualityComparable requirement of operator== could also be removed, but in that case both operators would at least need to require the BooleanTestable requirements (see 2114) for the result type of T's operator== and operator<. Arguably, corresponding operators for pair and tuple do not impose LessThanComparable (nor EqualityComparable), albeit the definition of the "derived" relation functions depend on properties ensured by LessThanComparable. According to the SGI definition, the intention was to imposed both EqualityComparable and LessThanComparable. If this is not intended, the standard should clarify this position.History | |||
---|---|---|---|
Date | User | Action | Args |
2018-06-22 06:38:21 | admin | set | messages: + msg9974 |
2018-06-22 06:38:21 | admin | set | status: lewg -> nad |
2016-11-20 18:58:35 | admin | set | messages: + msg8652 |
2015-03-22 18:18:12 | admin | set | messages: + msg7237 |
2015-02-23 23:58:50 | admin | set | status: new -> lewg |
2014-06-20 00:00:00 | admin | create |