Boost logo

Boost :

From: Ben Young (ben.young_at_[hidden])
Date: 2002-11-26 03:46:07


Yes, I agree about the name change. Sorry if the previous post seemed a
bit abrupt, I just dashed it off while waiting for a compile and it didn't
come out exactly as I intended. I was just trying to make the point that a
general comparison function which "does the right thing" is actually a
more basic concept than a tuple library, so that if one were to be
implemented in terms of the other, the tuple library should use the
comparison function (Although this is just speaking hypothetically, I am
not suggesting changing the tuple library).

With respect to specifying the comparison operator for each element,
perhaps the best compromise would be to offer two sets of overloads, one
with the ability to specify the operator, and one which just uses
std::less, as the whole point (at least from my point of view) was to
provide something which was very hard to use wrongly.

Anyway, thank you for you comments,

Cheers

Ben

---
On Mon, 25 Nov 2002, David Abrahams wrote:
> Ben Young <ben.young_at_[hidden]> writes:
>
> > On Mon, 25 Nov 2002, David Abrahams wrote:
> >
> >> Ben Young <ben.young_at_[hidden]> writes:
> >>
> >> Did you ever consider using
> >>
> >>     make_tuple(x1, y1, z1) < make_tuple(x2, y2, z2)
> >>
> >> ?
> >
> > Yes, but actually I am of the feeling that perhaps the tuple library
> > should be using the strict_... form rather than the other way around.
> >
> > Won't the make_tuple method make a copy of all its arguments?
>
> OK:
>
>         make_tuple(ref(x1), ref(y1), ref(z1)) < ...
>
> Anyway, in the past I have needed/wanted the strict_... function
> family you propose, but:
>
>        1. I would call it lexicographic_ordering
>
>        2. I would like to be able to specify the comparison used for
>           each of the parameters
> --
>                        David Abrahams
>    dave_at_[hidden] * http://www.boost-consulting.com
> Boost support, enhancements, training, and commercial distribution
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>

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