Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-30 21:18:00

"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?

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at