C++ Logo

STD-DISCUSSION

Advanced search

Subject: Operator <=> polymorphy
From: Hans Ã…berg (haberg-1_at_[hidden])
Date: 2019-11-22 07:19:49


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<=>.


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups