[libcxx] r276576 - Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL at microsoft.com
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 24 16:08:22 PDT 2016
Author: ericwf
Date: Sun Jul 24 18:08:21 2016
New Revision: 276576
URL: http://llvm.org/viewvc/llvm-project?rev=276576&view=rev
Log:
Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL at microsoft.com
Modified:
libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
Modified: libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp?rev=276576&r1=276575&r2=276576&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp Sun Jul 24 18:08:21 2016
@@ -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>(), "");
}
More information about the cfe-commits
mailing list