Fix PR 22106; make std::swap work for multi-dimensional arrays. Thanks to Peter Griess for the report and suggested fix

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-01-06 19:20:49 +00:00
parent c101738156
commit fd8ed7fa85
2 changed files with 53 additions and 0 deletions

View File

@@ -202,6 +202,10 @@ operator>=(const _Tp& __x, const _Tp& __y)
// swap_ranges
// forward
template<class _Tp, size_t _Np>
void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);
template <class _ForwardIterator1, class _ForwardIterator2>
inline _LIBCPP_INLINE_VISIBILITY
_ForwardIterator2