Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-03-12 15:24:16


Hess, Frank wrote:

>> To elaborate on Chris's point, the significance of keeping the producer
>> and the consumer interface separate is that it allows future<R> to be
>> made convertible to future<R2> whenever R is convertible to R2 (or
>> R2 is void); this also allows extensions in the spirit of Frank Mori
>> Hess's
>> operator[],
>
> Are you getting me confused with someone else? I don't remember any
> operator[]?

I needed to go and check the archives; with so much independent development
in this area it's easy to make attribution mistakes.

My otherwise unreliable memory turned out to be correct in this case; in:

http://lists.boost.org/Archives/boost/2007/03/117571.php

you say:

"You can do things like assign a Future<T> to a Future<U> if T is implicitly
converible to U, without blocking. You can also extract elements from
future containers and such, like getting a Future<int> from a
Future<std::vector<int> > without blocking."

Getting a Future<int> from Future< vector<int> > is an application of
operator[], although I admit I don't know how it's expressed in your
implementation.


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