On Fri, 30 Sep 2011 10:53:50 -0400, Christophe
<trav...@phare.normalesup.org> wrote:
What I think we need is to make the free function opEquals a template,
which only instantiates for objects, and then the lhs.opEquals(rhs) and
rhs.opEquals(lhs) will take full advantage of any overloaded opEquals.
For example, if you wanted to overload for non-const objects. But I
think
the default in Object should be const.
Thanks for the explanation.
That seems to be a nice solution to me.
(some people might complain of template bloat...)
I actually just tested this and it works (no compiler changes necessary).
I'll start a new thread to discuss.
-Steve