Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-11-13 18:36:49


Darin wrote:
> But for some types, == might be defined between two objects that are not
> implicitly convertible into the same type. Are you certain that this would
> never be useful?

You have put your finger on the motivation for the two-argument version of
(e.g.) equality_comparable.

Some people regard the free implicit conversion among built-in numeric types
as an evil thing. That doesn't mean that they shouldn't be comparable,
though. One could define a set of numeric classes with no implicit
conversions but well-defined comparisons (and arithmetic operations).

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk