C++ Logo


Advanced search

Operator <=> polymorphy

From: Hans Åberg <haberg-1_at_[hidden]>
Date: Fri, 22 Nov 2019 14:19:49 +0100
The operator<=> comparison operator generation tied to return type causes problems with polymorphy: In dynamic polymorphy, the plethora of return types are not useful, but when replaced with a single type, the comparison operators are not generated, and then templates conflict with the builtin types. For example, operator<= can compare signed and unsigned, but not operator<=>.

Received on 2019-11-22 07:22:12