cpp/experimental/when any

Create a std object that becomes ready when at least one of the input s and stds become ready. The behavior is undefined if any input or  is invalid.

In particular, let be a  for  and  for. This function template creates a shared state containing and returns a future referring to the shared state. Every input is moved into the corresponding object in the  member of the  in the shared state, and every input  is copied to the corresponding object  in the  member of the  in the shared state. The order of the objects in the matches the order of arguments.

@1@ This function does not participate in overload resolution unless 's value type (i.e., ) is a std or std. @2@ This function does not participate in overload resolution unless every argument is either a (possibly cv-qualified) std or a cv-unqualified std. (Formally, for every type in, either  is , or  is .)

After this call, every input is no longer valid; every input  remains valid.

Return value
A referring to the shared state created by the call. The future is always, and it becomes ready when at least one of the input s and s the call are ready. The member of the  contains the position of the ready  or  in the  member.

@1@ If the range is empty (i.e., ), the returned is ready immediately; the  field of the  is an empty vector, and the  field is. @2@ If no argument is provided, the returned is ready immediately; the  field of the  is an empty tuple, and the  field is.