Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-08-03 09:11:39


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> writes:

>> 2. Sounds like it should be true if any of the values in a equals
>> none of the values in b.

That sounds right to me.

> No, the (2) should be true if any value from 'a'
> cannot be equaled to some single value from 'b'.
> This would make it symetrical to (1).

That sounds completely counterintuitive.

> Say:
> a = green, blue, blue
> b = blue, red
>
> none_of(a) == any_of(b)
> is false because there is blue (even 2 of them)
> from 'a' that match something in 'b'
>
> any_of(a) == none_of(b)
> is false because there are two different cases
> when blue from 'a' is in 'b'.

No, it should be true, because there is something in a that is equal
to nothing in b.

   any_of(x) == whatever

should always be equivalent to

   x[0] == whatever
   x[1] == whatever
   x[2] == whatever

Anyway, saying that symmetry requires

     none_of(a) == any_of(b)

  to be equivalent to

     any_of(a) == none_of(b)

is about as valid as saying

     3*x == 1+y

  must be equivalent to

     1+x == 3*y

It makes no sense to me.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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