From 6f367f088c5c19e0dd395e568d77d4178ce38b1d Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 22 Apr 2016 00:47:15 +0000 Subject: [PATCH] Fix C++03 build breakage git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267090 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../sequences/array/array.special/swap.pass.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/std/containers/sequences/array/array.special/swap.pass.cpp b/test/std/containers/sequences/array/array.special/swap.pass.cpp index d8532d7ba..413f291a2 100644 --- a/test/std/containers/sequences/array/array.special/swap.pass.cpp +++ b/test/std/containers/sequences/array/array.special/swap.pass.cpp @@ -64,9 +64,7 @@ int main() } { typedef NonSwappable T; - typedef std::array C1; typedef std::array C0; - static_assert(!can_swap::value, ""); static_assert(can_swap::value, ""); C0 l = {}; C0 r = {}; @@ -75,4 +73,13 @@ int main() static_assert(noexcept(swap(l, r)), ""); #endif } +#if TEST_STD_VER >= 11 + { + // NonSwappable is still considered swappable in C++03 because there + // is no access control SFINAE. + typedef NonSwappable T; + typedef std::array C1; + static_assert(!can_swap::value, ""); + } +#endif }