On Thu, Nov 13, 2008 at 12:34 PM, Roy Stogner <roystgnr@ices.utexas.edu> wrote:
> On Thu, 13 Nov 2008, Benjamin Kirk wrote:
>
> > Right now we can get a bounding box for two processors easily
> > enough, and (I am sure you are gonna love this...) overload '&&' to
> > return true if they intersect.
>
> If you must use operator overloading, at least use '&' instead?
> Bitwise AND resembles an intersection operation more than logical AND
> does.

How about neither?  Quoting from this thread: http://groups.google.com/group/comp.lang.c++.moderated/browse_frm/thread/653d549fc65b1129/cbd2edba6796b627?hl=en&lnk=gst&q=overload++%26%26#cbd2edba6796b627

Operators like ?:, but also &&, || and , (the comma operator)
introduce sequence points and impose ordering, neither of which
occurs in the case of overloading.... 

Operators like , (the comma operator), unary & and ?: (for the
second and third parameters) are already defined for all
possible types.  Overloading them changes the semantics of a
previously legal program.  As such, they shouldn't be used, even
when the can be legally used.

--
John