Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-02-03 23:41:12


on 2/3/00 7:55 PM, Aleksey Gurtovoy at alexy_at_[hidden] wrote:

> Now I see some problems with that too - suppose we have 'point p1' which
> used somewhere in a code like
>
> | POINT p2;
> | // ...
> | p1 << p2;
>
> And later we decide to change the definition of p1 to 'const point' - now
> our code is silently broken...
> So we return to 'make_point'??

I don't think we have to give up on it if we only allow a const first
argument. It's just like an expression x << y where x and y are ints:
neither is modified but the expression returns a new value.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk