Boost logo

Boost :

From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2006-07-11 08:37:24


>
> How do you make a std::set of structs, pairs, or tuples?
>

Maybe it was already said (didn't read the whole thread), but I thought I'd
add my 0.02$.

I think we should not define meaningless operator< for the structs/whatever,
and let the user define one if he wants to use those structs in a set.

We could maybe also do some template / macro fun to help them to define
those ? Something like :

#define DEF_OP_MIN(cont) bool cont::operator<(const cont& a, const cont&b) {
return &a < &b; }

Philippe


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