[C++-sig] operator definitions
greg.landrum at gmail.com
Sat Apr 8 17:02:41 CEST 2006
On 4/8/06, David Abrahams <dave at boost-consulting.com> wrote:
> Neal Becker <ndbecker2 at gmail.com> writes:
> > It looks cool, but IMHO a bit too cute. AFAIK, it doesn't do anything
> > different than the IMHO much more clear:
> > .def("__iadd__", plusAssignOp, return_self<>())
> How is that more clear? *I* certainly can't tell what it means.
I'm with David on this one, and the contrast is even more extreme when
you define __add__ (the "clear" syntax for that stymied me, and it was
the resulting web search that turned up the new-to-me syntax).
More information about the Cplusplus-sig