On Thu, Nov 13, 2008 at 12:34 PM, Roy Stogner <[EMAIL PROTECTED]>
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
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel