|
Boost : |
From: John E. Potter (jpotter_at_[hidden])
Date: 2001-03-22 11:24:26
On Thu, 22 Mar 2001, Jeremy Siek wrote:
> I have not made a place for your negative imaginary numbers... is
> there a real ;) reason to have these?
<G>
I was thinking of the nanny school which wishes to prevent the user from
doing stupid things. It has a long and respected history of returning
const udt rvalues to prevent modifiable rvalues.
x = * iter ++ ++;
"works" with standard iterators, but is silly. If the postfix increment
were not a member which returned a non-const rvalue, it would give a
compile error. I'm sure that someone will want an iterator where
operator* returns a const rvalue to prevent
*iter = x;
I leave the "real" modifier of the "reason" to the politically correct.
John
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk