Compartilhar via


operator&& Operator (C++ REST SDK)

Creates a task that will complete succesfully when both of the tasks supplied as arguments complete successfully.

Warning

This topic contains information for the C++ REST SDK 1.0 (codename "Casablanca"). If you are using a later version from the Codeplex Casablanca web page, then use the local documentation at http://casablanca.codeplex.com/documentation.

template<
   typename _ReturnType
>
task<std::vector<_ReturnType>> operator&&(
   const task<_ReturnType> & _Lhs,
   const task<_ReturnType> & _Rhs
);

template<
   typename _ReturnType
>
task<std::vector<_ReturnType>> operator&&(
   const task<std::vector<_ReturnType>> & _Lhs,
   const task<_ReturnType> & _Rhs
);

template<
   typename _ReturnType
>
task<std::vector<_ReturnType>> operator&&(
   const task<_ReturnType> & _Lhs,
   const task<std::vector<_ReturnType>> & _Rhs
);

template<
   typename _ReturnType
>
task<std::vector<_ReturnType>> operator&&(
   const task<std::vector<_ReturnType>> & _Lhs,
   const task<std::vector<_ReturnType>> & _Rhs
);

inline task<void> operator&&(
   const task<void> & _Lhs,
   const task<void> & _Rhs
);

Parameters

  • _ReturnType
    The type of the returned task.

  • _Lhs
    The first task to combine into the resulting task.

  • _Rhs
    The second task to combine into the resulting task.

Return Value

A task that completes successfully when both of the input tasks have completed successfully. If the input tasks are of type T, the output of this function will be a task<std::vector<T>>. If the input tasks are of type void the output task will also be a task<void>.

Remarks

If one of the tasks is canceled or throws an exception, the returned task will complete early, in the canceled state, and the exception, if one is encoutered, will be thrown if you call get() or wait() on that task.

Requirements

Header: pplxtasks.h

Namespace: pplx

See Also

Reference

pplx Namespace

Concepts

Task Parallelism (Concurrency Runtime)