[libcxx] r267090 - Fix C++03 build breakage

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 17:47:16 PDT 2016


Author: ericwf
Date: Thu Apr 21 19:47:15 2016
New Revision: 267090

URL: http://llvm.org/viewvc/llvm-project?rev=267090&view=rev
Log:
Fix C++03 build breakage

Modified:
    libcxx/trunk/test/std/containers/sequences/array/array.special/swap.pass.cpp

Modified: libcxx/trunk/test/std/containers/sequences/array/array.special/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/array.special/swap.pass.cpp?rev=267090&r1=267089&r2=267090&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/array/array.special/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/array/array.special/swap.pass.cpp Thu Apr 21 19:47:15 2016
@@ -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
 }




More information about the cfe-commits mailing list