Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-22 11:10:13


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
>
> What convinced me that operator< is the right ordering primitive (in the
> context of the current standard library design) was that I needed to make
a
>
> std::map<std::pair<typeinfo, typeinfo>, ...>
>
> and a specialized std::less doesn't work here, while an operator< does.

Sorry, I must be dense. Are you saying that you define your operator< in the
global namespace? Why wouldn't the standard's version of operator< for pair
work without intervention?

> This
> is not limited to std::pair, by the way; containers, as per table 65, also
> have a 'proper' operator<, but no less<> specialization.
>
> In any event, if we really have to reinvent the ordering primitive, I
> suggest we _not_ name it boost::less (boost::before maybe.)

precedes?
is_ordered?

> And of course, as a MSVC user, I prefer something that works over
something
> that doesn't work.

Unlike the rest of us? ;-)

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================


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