The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Visual Studio 2012
Creates a task that will complete successfully when any of the tasks supplied as arguments completes successfully.
template< typename _Iterator > auto when_any( _Iterator_Begin, _Iterator_End ) -> decltype (details::_WhenAnyImpl<std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(nullptr, _Begin, _End)); template< typename _Iterator > auto when_any( _Iterator_Begin, _Iterator_End, cancellation_token _CancellationToken ) -> decltype (details::_WhenAnyImpl<std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_CancellationToken._GetImplValue(), _Begin, _End));
A task that completes successfully when any one of the input tasks has completed successfully. If the input tasks are of type T, the output of this function will be a task<std::pair<T, size_t>>>, where the first element of the pair is the result of the completing task, and the second element is the index of the task that finished. If the input tasks are of type void the output is a task<size_t>, where the result is the index of the completing task.