Boost logo

Threads-Devel :

From: Anthony Williams (anthony_at_[hidden])
Date: 2008-03-13 14:04:06


Quoting Frank Mori Hess <frank.hess_at_[hidden]>:
> A more verbose example Just to make sure I've been clear:
>
> future<U> fu;
> // ...
> future<V> fv = fu;
> future<W> fw = fv;
> future<X> fx = fw;
> future<Y> fy = fx;
>
> When fu becomes ready, fy becomes ready with the same value as if
> you had done
>
> future<U> fu;
> // ...
> U u = fu;
> V v = u;
> X x = v;
> Y y = x;

That's what I expected. It just feels wrong to me to provide a
future<Y> that actually does Y(X(W(V(some_u)))) when you get a value
from it. You could end up having a future<double> that does
(double)(int)(some_double), thus truncating the initial value, and
this isn't apparent from what you've got.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk