Boost logo

Boost :

From: Matthew Austern (austern_at_[hidden])
Date: 2000-11-29 15:08:59

Jeremy Siek wrote:
> The issue of two types involved in a comparison also seems to apply to the
> family of std::find functions, but with EqualityComparable instead of
> LessThanComparable.

Except there I think there is no question: mixed comparisons
are clearly legal. The reason they're problematic for
lower_bound is that the comparison that's used for searching
must be the same as the comparison that was used for sorting
the sequence.

What's at issue here, for lower_bound, is whether it can ever
make sense to say that two comparison functions are the
same even though one is a comparison between T and T and the
other is a comparison between T and U. There is no such
issue for find.


Boost list run by bdawes at, gregod at, cpdaniel at, john at