Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-08-30 22:05:58


David Abrahams wrote:
> "Eric Friedman" <ebf_at_[hidden]> writes:
>
> > Ultimately, I do not believe any ordering scheme will provide
meaningful,
> > straightforward semantics. Assuming I am correct, I propose that the
variant
> > library offer your ordering scheme -- but only as an explicit comparison
> > function, calling it variant_less. This would allow, for instance:
> >
> > std::set< my_variant, boost::variant_less<my_variant> >
> >
> > I'd appreciate feedback.
>
> I had the same thought myself, though I'd be inclined to spend a
> little time searching for a better name than "less", since it doesn't
> really mean that. Maybe "variant_before", using type_info::before as
> a precedent?

Sounds good to me. (I was a bit uncomfortable with 'less' as well.)

I'll work something up.

Eric


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