Skip to content

Commit b6c297e

Browse files
committed
Fix for issue #14.
1 parent 84b135f commit b6c297e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/algorithm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,16 @@ namespace std{
383383
b = temp;
384384
}
385385

386+
template<class ForwardIterator1, class ForwardIterator2> _UCXXEXPORT
387+
void
388+
iter_swap(ForwardIterator1 a, ForwardIterator2 b)
389+
{
390+
typename iterator_traits<ForwardIterator1>::value_type temp(*a);
391+
*a = *b;
392+
*b = temp;
393+
}
394+
395+
386396
template<class ForwardIterator1, class ForwardIterator2> _UCXXEXPORT
387397
ForwardIterator2
388398
swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2)
@@ -396,16 +406,6 @@ namespace std{
396406
}
397407

398408

399-
template<class ForwardIterator1, class ForwardIterator2> _UCXXEXPORT
400-
void
401-
iter_swap(ForwardIterator1 a, ForwardIterator2 b)
402-
{
403-
typename iterator_traits<ForwardIterator1>::value_type temp(*a);
404-
*a = *b;
405-
*b = temp;
406-
}
407-
408-
409409
template<class InputIterator, class OutputIterator, class UnaryOperation> _UCXXEXPORT
410410
OutputIterator
411411
transform(InputIterator first, InputIterator last,

0 commit comments

Comments
 (0)