Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL@micro...
authorEric Fiselier <eric@efcs.ca>
Sun, 24 Jul 2016 23:08:21 +0000 (23:08 +0000)
committerEric Fiselier <eric@efcs.ca>
Sun, 24 Jul 2016 23:08:21 +0000 (23:08 +0000)
llvm-svn: 276576

libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp

index 63d3c9b..a543fff 100644 (file)
@@ -24,6 +24,8 @@
 #include <type_traits>
 #include <cassert>
 
+#include "test_macros.h"
+
 int dummy = 42;
 
 int return_value(int) { return dummy; }
@@ -81,10 +83,10 @@ void do_test(Fn* func) {
     // Check that the call operator SFINAE's away when too few arguments
     // are provided but is well-formed otherwise.
     {
-        static_assert(!CheckCall<Bind>(), "");
+        LIBCPP_STATIC_ASSERT(!CheckCall<Bind>(), "");
         static_assert(CheckCall<Bind, int>(), "");
         static_assert(CheckCall<Bind, int, int>(), "");
-        static_assert(!CheckCall<BindR>(), "");
+        LIBCPP_STATIC_ASSERT(!CheckCall<BindR>(), "");
         static_assert(CheckCall<BindR, int>(), "");
         static_assert(CheckCall<BindR, int, int>(), "");
     }
@@ -108,7 +110,7 @@ void do_test_r(Fn* func) {
     // Check that the call operator SFINAE's away when too few arguments
     // are provided but is well-formed otherwise.
     {
-        static_assert(!CheckCall<Bind>(), "");
+        LIBCPP_STATIC_ASSERT(!CheckCall<Bind>(), "");
         static_assert(CheckCall<Bind, int>(), "");
         static_assert(CheckCall<Bind, int, int>(), "");
     }