@@ -56,7 +56,9 @@ copy_async(InputIterator first,
5656 !is_device_iterator<InputIterator>::value
5757 >::type* = 0 )
5858{
59- typedef typename InputIterator::difference_type diff_type;
59+ typedef typename
60+ std::iterator_traits<InputIterator>::difference_type diff_type;
61+
6062 std::vector<event> events;
6163 events.reserve (result.parts ());
6264
@@ -128,7 +130,9 @@ copy_async(const vector<T, weight, Alloc> &input,
128130 >
129131 >::type* = 0 )
130132{
131- typedef typename OutputIterator::difference_type diff_type;
133+ typedef typename
134+ std::iterator_traits<OutputIterator>::difference_type diff_type;
135+
132136 std::vector<event> events;
133137 events.reserve (input.parts ());
134138
@@ -197,7 +201,9 @@ copy_async(InputIterator first,
197201 is_device_iterator<InputIterator>::value
198202 >::type* = 0 )
199203{
200- typedef typename InputIterator::difference_type diff_type;
204+ typedef typename
205+ std::iterator_traits<InputIterator>::difference_type diff_type;
206+
201207 std::vector<event> events;
202208 events.reserve (result.parts ());
203209
@@ -246,7 +252,9 @@ copy(InputIterator first,
246252 is_device_iterator<InputIterator>::value
247253 >::type* = 0 )
248254{
249- typedef typename InputIterator::difference_type diff_type;
255+ typedef typename
256+ std::iterator_traits<InputIterator>::difference_type diff_type;
257+
250258 std::vector<event> events;
251259 events.reserve (result.parts ());
252260
@@ -314,7 +322,9 @@ copy_async(const vector<T, weight, Alloc> &input,
314322 >
315323 >::type* = 0 )
316324{
317- typedef typename OutputIterator::difference_type diff_type;
325+ typedef typename
326+ std::iterator_traits<OutputIterator>::difference_type diff_type;
327+
318328 std::vector<event> events;
319329 events.reserve (input.parts ());
320330
@@ -362,7 +372,9 @@ copy(const vector<T, weight, Alloc> &input,
362372 >
363373 >::type* = 0 )
364374{
365- typedef typename OutputIterator::difference_type diff_type;
375+ typedef typename
376+ std::iterator_traits<OutputIterator>::difference_type diff_type;
377+
366378 std::vector<event> events;
367379 events.reserve (input.parts ());
368380
0 commit comments