Boost logo

Boost Users :

From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2008-08-22 03:04:06


On Fri, Aug 22, 2008 at 12:51:11PM +0800, Joel de Guzman wrote:
>
> Well, you have to choose between what's ideal and what's practical
> at some point. Fusion follows the footsteps of MPL. In MPL map too,
>
I understand, and I agree. Perfection is the worst enemy of good enough :)

>
> You are right. It's best to add the relations operators following
> == and !=. Would you provide a patch?
>
Looking at the pair code, it doesn't look to hard or too scary, so I might. It
depends on whether an acceptable patch must also include corresponding tests?
If so, I don't have time nor desire to learn Jam. But, one step at a time,
I'll make the changes locally, test them and send you the patch.

>
> Yes it's possible. I'll leave the details as an intellectual exercise :-)
>
I did think about it a bit: it would require assigning an integer id to every
type. Then the IDs could be used for sorting the pair lists into a defined
order. While it's not hard to manually do such assignment to built-in types, I
have no idea how I could make the compiler assign a new integer id to every
user-defined type, without the user having to do anything.

(typeinfo defines .before() member for ordering, but I think that works only
at runtime.. so I'm a bit in the dark. maybe the approach with ordering the
types is not the right one.. puzzle for further thinking)


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