Boost logo

Boost :

From: Lois Goldthwaite (loisg_at_[hidden])
Date: 2001-01-27 12:51:13


> "Dean Sturtevant" <deansturtevant_at_[hidden]> writes:
>
> Well consider std::less<T*>. Formally the Standard consider it
> undefined to compare pointers which are part not part of the same
> array. How would you define it if you get a compiler which doesn't
> define it? If Boost were to define such class template, should it
> require the Standard to remove that restriction? My point is that
> there are many areas where the Standard gets in the way of "normal"
> users, but not for implementor.

Well, there is no need for boost to define std::less<T*> and its
brethren:

See 20.3.3p8 - For templates greater, less, greater_equal, and
less_equal, the specializations for any pointer type yield a
total order, even if the built-in operators <, >, <=, >= do not.

Lois


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