|
Boost Users : |
From: Joel de Guzman (joel_at_[hidden])
Date: 2008-08-21 10:35:22
Zeljko Vrba wrote:
> Related to my previous question: fusion::map is a sequence and instances of it
> could be directly compared with operator < , thus vectors of instances also
> sorted if fusion::pair supported relational operators other than == and !=
> (which it doesn't).
>
> So, two questions:
>
> 1. What is the recommended way of defining operator< for particular pair
> instances (e.g. for pair<net, int>) ?
>
> 2. An explanation of why doesn't fusion::pair define at least operator< would
> be welcome.
The reason is I don't know (yet) how to do 1 :-) If there are some
suggestions, I see no reason why it can't be added to the library.
So... how do you compare a half-static-half-runtime pair? Compare
just the value part? How about pairs with different static parts
but comparable runtime parts, how do they compare? Simply disallow?
Comments, suggestions welcome.
Regards,
-- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net