Boost logo

Boost :

From: Florian Stegner (FlSt_at_[hidden])
Date: 2005-08-18 11:02:23


David Abrahams wrote:

>Rob Stewart <stewart_at_[hidden]> writes:
>
>
>
>Not with the parens in there. What's that for? Are you assuming
>some_predicate is the type of a stateless function object?
>
> if (any_of(...) <<some_predicate>> 5)... // 1
>
> if (any_of(...) <some_predicate> 5)... // 2
>
> if (any_of(...) ^some_predicate^ 5)... // 3
>
> if (any_of(...) /some_predicate/ 5)... // 4
>
>
>That's a little better. I guess any of them but the last looks okay.
>
>Have you considered how/whether operator precedence will affect the
>usability of these?
>
>
Yes we have done that in a private discussion. I think the minumum
precendence must be higher than the &&, || operators. So that
expressions like any_of( a ) <<pred()>> all_of( b ) && any_of( c ) <
all_of( d ) are interpreted correct.

Florian.


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