At Tuesday 2002/08/06 14:02, you wrote:
In-Reply-To: <4.3.1.2.20020805090951.03730a48@mail.rudbek.com>
On Mon, 05 Aug 2002 09:25:03 -0700 Victor A. Wagner, Jr.
(vawjr@rudbek.com) wrote:
> If there are people who see some "lexicographic" ordering to the
> elements of a set, then we've got some differences to address. From my
> point of view, all the elements in a set are of "equal importance" and
> the < and operators should return the same results independent of
> the underlying implementation.
>
> With that in mind, it appears that one could simply have operator <=()
> (and >=() with the args reversed) call is_subset_of() and have operator
> <() (>() ditto above) call is_proper_subset().
Some kind of total ordering can be handy when using STD algorithms and
containers which expect it. For example, std::map (or std::set for that
matter). In this situation we don't much care what the order actually is.
We are using it as the moral equivalent of a hash() function. So it can
depend on the implementation. A lexical ordering will do.
is_proper_subset() won't, because it is not a total order.
That is an argument for something like lexical_order(), or perhaps less().
I suppose you could still have operator<() map to is_proper_subset(), but
I would find that surprising.
-- Dave Harris
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost