0

here https://msdn.microsoft.com/en-us/library/jj969480.aspx

the code is like this

template<typename _Iterator>
auto when_any(_Iterator _Begin, _Iterator _End, const task_options& _TaskOptions = task_options())
-> decltype (details::_WhenAnyImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_TaskOptions, _Begin, _End))
{
       typedef typename std::iterator_traits<_Iterator>::value_type::result_type _ElementType;
       return details::_WhenAnyImpl<_ElementType, _Iterator>::_Perform(_TaskOptions, _Begin, _End);
}

my question is

 typedef typename std::iterator_traits<_Iterator>::value_type::result_type _ElementType;

where is result_type coming from?

thanks a lot

graham.reeds
  • 16,230
  • 17
  • 74
  • 137

1 Answers1

1

I solved the problem.

Looks like std::iterator_traits<_Iterator>::value_type should be correct.

Box Box Box Box
  • 5,094
  • 10
  • 49
  • 67