summaryrefslogtreecommitdiffstats
path: root/libcxx/include/utility
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/utility')
-rw-r--r--libcxx/include/utility24
1 files changed, 3 insertions, 21 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility
index a185818b6fc..64599c8d55d 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -248,29 +248,11 @@ operator>=(const _Tp& __x, const _Tp& __y)
} // rel_ops
-// swap_ranges
+// swap_ranges is defined in <type_traits>`
+// swap is defined in <type_traits>
-template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
-_ForwardIterator2
-swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2)
-{
- for(; __first1 != __last1; ++__first1, (void) ++__first2)
- swap(*__first1, *__first2);
- return __first2;
-}
-
-// forward declared in <type_traits>
-template<class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename enable_if<
- __is_swappable<_Tp>::value
->::type
-swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
-{
- _VSTD::swap_ranges(__a, __a + _Np, __b);
-}
+// move_if_noexcept
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
OpenPOWER on IntegriCloud