
David Abrahams wrote:
Rob Stewart <stewart@sig.com> 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.