|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-08-04 10:30:01
Liu Jin <cpp_at_[hidden]> writes:
>>>>>> "David" == David Abrahams <dave_at_[hidden]> writes:
> > 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.
>
> But it does break symmetry when
> none_of(a) == any_of(b) [no x in a equals to any y in b]
> is different from
> any_of(b) == none_of(a) [some x in b equals to nothing in a]
Yes. But as I said earlier, I don't think it's important for == to be
symmetric in this case. You had no problem reading the different
meanings of those two expressions. Unless people start putting
any_of(b) in containers (which we can easily prevent) I think the risk
of having an assymetric equality operator is vanishingly low.
-- 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