Boost logo

Boost :

From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2023-11-09 16:44:01


czw., 9 lis 2023 o 17:32 Klemens Morgenstern <
klemensdavidmorgenstern_at_[hidden]> napisał(a):

> > Actually, your explanation convinces me even stronger that this should
> be a different function with a different name. It is a different use case,
> it has a different signature, a different return type.
> >
>
> How is the use case different? I got multiple awaitable and I want to
> wait for one to finish. The decision of how many is either a runtime
> or a compile time decision and we're discussing how to handle the
> runtime error. Sounds like the same thing to me.
>

They have different preconditions: one requires a non-epty variadic pack.
One allows promises with different result types, the other doesn't.
They differ in return types: one returns a variant, the other returns a
pair. So, the following code will look different in either case.

Sure they share some similarities. Much like `race` and `left_race` do. But
they have two different names.

Regards,
&rzej;


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