
From: David Abrahams <dave@boost-consulting.com>
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
"David Abrahams" <dave@boost-consulting.com> wrote
Rob Stewart <stewart@sig.com> writes:
all_of(a)._(frobnicates, any_of(b)) all_of(a)._,frobnicates, any_of(b) all_of(a)._ %frobnicates% any_of(b) all_of(a)._ |frobnicates| any_of(b) all_of(a)._ <frobnicates> any_of(b) all_of(a)(frobnicates, any_of(b))
Yuck and Yuck FWIW. AFAIK only prefix user defined operations work in C++.
if ( frobnicates(all_of(a), any_of(b))) {
You can't do that unless you ask people to put smarts about all_of and any_of inside of frobnicates. The goal is to use a general predicate such as std::less<int>()
I didn't notice this earlier, but I'm not sure if we can achieve your goal. The current implementation of an expression like any_of(a) <frobnicates> any_of(b) is to iterate the range in a calling frobnicates with each value from a with any_of(b). That expression gets reversed suitably such that it iterates the values in b calling frobnicates with the each value in b and the one value from a. I'll have to take another look at how I've implemented things to see whether I can achieve the goal you've set, because I can see the value in meeting it. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;