Boost logo

Boost :

From: Neil Groves (neil_at_[hidden])
Date: 2008-08-29 09:25:54


On Fri, Aug 29, 2008 at 2:13 PM, Arno Schödl <aschoedl_at_[hidden]>wrote:

> I have seen your | operator. It is o.k. for unary things, like rng |
> filter( predicate ), but for binary things, it is a bit weird:
>
> rngA | difference(rngB)
>
> I find the alternatives clearer: rngA - rngB would be nice (but requires
> concept checking), or difference( rngA, rngB ).
>

Indeed I can definately see your point about binary operations.

>
> But regardless of notation, doesn't this suffer from the same problem that
> these objects are temporaries?
>

Yes, it does not help at all with the 'difference' issue. Would you be able
to supply code for the difference solution you have proposed? I would be
happy to look at it. It would help me understand the problem more
concretely. If you have specific suggestions for changes to range / range_ex
then I would be happy to consider them. With my currently level of
non-understanding of the actual difference algorithm I wonder if the result
is not more appropriately a model of a Container rather than a Range?

Neil

>
> Arno
>


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