
Liu Jin <cpp@vip.163.com> writes:
"David" == David Abrahams <dave@boost-consulting.com> 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