|
Boost : |
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2008-05-19 22:26:23
On Mon, May 19, 2008 at 10:17 PM, Frank Mori Hess <frank.hess_at_[hidden]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 19 May 2008 10:05 am, Anthony Williams wrote:
>> "Dean Michael Berris" <mikhailberis_at_[hidden]> writes:
>> > Right now, having futures non-default constructable makes it hard(er)
>> > to put them in standard containers.
>>
>> The futures in my proposal can be default-constructed. unique_future
>> requires a move-aware container, but shared_future should be usable in any
>> container.
>
> Turns out the Gaskill future is also default constructible, according to its
> docs. Where did the idea they neither were default constructible come from?
>
My bad. I was thinking more about the "validity" of default
constructed futures that don't have an associated promise. I was under
the impression that there wasn't a way to create a future without an
existing promise object. So something like:
future<int>();
Would introduce an either invalid future whose value could not ever be
set through an associated promise.
-- Dean Michael C. Berris Software Engineer, Friendster, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk