
Rob Stewart <stewart@sig.com> writes:
I just took a look at my implementation of all and each. At least in my latest version, it's worse than you describe. They are identical. Regardless of how I've implemented them, these are the intended semantics:
all: all of the values must match *the same* other value
each: all of the values must match *some* other value
Thus, all_of({1, 2, 3}) < any_of({3, 4}) means:
1 < 3: true 2 < 3: true 3 < 3: false 1 < 4: true 2 < 4: true 3 < 4: true result: true
But, each_of({1, 2, 3}) < any_of({3, 4}) means:
1 < 3: true 2 < 3: true 3 < 3: false 3 < 4: true result: true
IMO that's terribly confusing. The first one should be all_of({1, 2, 3}) < one_of({3, 4}) And the second one should be all_of({1, 2, 3}) < any_of({3, 4}) -- Dave Abrahams Boost Consulting www.boost-consulting.com