Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-03-07 01:34:04


On 07/03/11 03:25, Peter Dimov wrote:
> I probably should note that expression templates require CoW, as far
> as I can see; if you return an expression from a*b instead of
> computing the product, the expression needs to keep a and b alive.
> Having it store copies would defeat the purpose. Storing references
> wouldn't work well in generic code such as a forwarding function. Even
> something as simple as auto x = f() + y; would be a subtle bug.
Well , ET based code usually keep references to large terminals. the
'auto'/ET interaction is known and is likely to never occurs.
And if needed, well, that's what proto::deep_copy is for.


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