Boost logo

Boost :

Subject: Re: [boost] [outcome] outcome without empty state?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-05-25 10:08:42


Le 25/05/2017 à 01:24, Gavin Lambert via Boost a écrit :
> On 25/05/2017 08:44, Jonathan Müller wrote:
>> What about providing no default constructor? There are two valid
>> choices so
>> why surprise half the users?
>>
>> Yes, it makes it a bit harder to use in arrays, but how often would
>> it need
>> to be stored in arrays anyways.
>
> Surprisingly often, if it ends up being used to represent the
> collection of results from methods executed in sequence or in parallel
> (although perhaps future<> is more suited to that task, since they're
> more likely to be asynchronous).
>
I need to store a collection of results even if the tasks are not
executed concurrently. Not all application need the complexity of
concurrency.

Vicente


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