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".