|
Boost : |
From: Daniel James (daniel_at_[hidden])
Date: 2005-03-16 14:32:14
Daniel James wrote:
>
> template <class X, class Y>
> bool container_equal(X const& x, Y const& y);
>
> bool MyType::operator==(MyType const& x) {
> return container_equal(use_a ? a : b, x.use_a ? x.a : x.b);
> }
>
> The types of a and b also matters, the static casts here are a little
Oops, implicit casts, not static casts
> worrying. But the point is, if the types are right, then Peter's
> proposal is ideal in this situation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk