From d24c465beaec2fe9a0e365e6379cd5d3acaeb2ca Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 14 Jun 2016 21:31:42 +0000 Subject: Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../utilities/function.objects/func.memfn/member_function.pass.cpp | 4 +++- test/std/utilities/function.objects/unord.hash/enum.pass.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'test/std/utilities/function.objects') diff --git a/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp b/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp index f371223ee..465e001c3 100644 --- a/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp +++ b/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp @@ -15,6 +15,8 @@ #include #include +#include "test_macros.h" + struct A { char test0() {return 'a';} @@ -69,7 +71,7 @@ int main() test0(std::mem_fn(&A::test0)); test1(std::mem_fn(&A::test1)); test2(std::mem_fn(&A::test2)); -#if __has_feature(cxx_noexcept) +#if TEST_STD_VER >= 11 static_assert((noexcept(std::mem_fn(&A::test0))), ""); // LWG#2489 #endif } diff --git a/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/test/std/utilities/function.objects/unord.hash/enum.pass.cpp index a91f491f6..8aa2c1df8 100644 --- a/test/std/utilities/function.objects/unord.hash/enum.pass.cpp +++ b/test/std/utilities/function.objects/unord.hash/enum.pass.cpp @@ -12,7 +12,9 @@ // make sure that we can hash enumeration values // Not very portable -#if __cplusplus >= 201402L +#include "test_macros.h" + +#if TEST_STD_VER >= 14 #include #include -- cgit v1.2.3