aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/stl_algobase.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/stl_algobase.h')
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index a67d2a9a320..426fcba0298 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -155,7 +155,14 @@ namespace std
_ValueType2>)
__glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
_ValueType1>)
- std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value>::
+
+ typedef typename iterator_traits<_ForwardIterator1>::reference
+ _ReferenceType1;
+ typedef typename iterator_traits<_ForwardIterator2>::reference
+ _ReferenceType2;
+ std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value &&
+ __are_same<_ValueType1 &, _ReferenceType1>::__value &&
+ __are_same<_ValueType2 &, _ReferenceType2>::__value>::
iter_swap(__a, __b);
}