Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 1999-11-13 13:34:24


>> template <class T, class U = T>
>> class equality_comparable
>> {
>> friend bool operator==( const U& y, const T& x );
>> friend bool operator!=( const U& y, const T& x );
>> friend bool operator!=( const T& y, const U& x );
>> };

Valentin:
> I don't think that all these versions are really usefull.
>
> I mean, since iterator is implicitly convertable to
> const_iterator, it != const_it should be ok, shouldn't it ?

Agreed.

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?

    -- Darin


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