non-member swap for array was mistakenly taking const ref params. Fixed and added test. Thanks to Ben Craig for the catch

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@262866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-03-07 21:57:10 +00:00
parent 60d223df07
commit 8d48d9b2cc
2 changed files with 29 additions and 2 deletions

View File

@@ -279,7 +279,7 @@ typename enable_if
__is_swappable<_Tp>::value,
void
>::type
swap(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
_NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
{
__x.swap(__y);