Boost logo

Boost :

Subject: Re: [boost] [outcome] outcome without empty state?
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-05-25 22:58:22


On 25/05/2017 22:08, Vicente J. Botet Escriba wrote:
> Le 25/05/2017 à 01:24, Gavin Lambert 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.

Which is why I included "in sequence".


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