|
Boost : |
From: John E. Potter (jpotter_at_[hidden])
Date: 2001-02-08 17:11:13
On Thu, 8 Feb 2001, Aidan Kenny wrote:
> Any class implementing operator+ should return a const value. This will
> cause a compile error if we try to do something stupid like,
>
> object_x + object_y = object_z;
[...]
> Hope I'm right here,
You're right, it is a well known safe idiom recommended in many famous
books.
You're wrong, see std::complex.
It's an old debate.
John
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk