diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-04-22 00:47:15 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-04-22 00:47:15 +0000 |
commit | b7f045fc7d97c53ee1b1e9fc78fe6e3eac8fc05f (patch) | |
tree | 4c657206e2b2811b1e5567f23e39d9246cef1ce6 /libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp | |
parent | 379609329d7e7db5ae3c95c2aef3726668364a87 (diff) | |
download | bcm5719-llvm-b7f045fc7d97c53ee1b1e9fc78fe6e3eac8fc05f.tar.gz bcm5719-llvm-b7f045fc7d97c53ee1b1e9fc78fe6e3eac8fc05f.zip |
Fix C++03 build breakage
llvm-svn: 267090
Diffstat (limited to 'libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp')
-rw-r--r-- | libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp index d8532d7ba7f..413f291a2a3 100644 --- a/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp @@ -64,9 +64,7 @@ int main() } { typedef NonSwappable T; - typedef std::array<T, 42> C1; typedef std::array<T, 0> C0; - static_assert(!can_swap<C1&>::value, ""); static_assert(can_swap<C0&>::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<T, 42> C1; + static_assert(!can_swap<C1&>::value, ""); + } +#endif } |