summaryrefslogtreecommitdiffstats
path: root/test/std/utilities/function.objects
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-14 21:31:42 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-14 21:31:42 +0000
commitd24c465beaec2fe9a0e365e6379cd5d3acaeb2ca (patch)
tree61dc7ca85dc611e7456a38ad3b97ceca67a01025 /test/std/utilities/function.objects
parent174432dbd52dddcb683ef14b3c8de083cad9d28c (diff)
downloadexternal_libcxx-d24c465beaec2fe9a0e365e6379cd5d3acaeb2ca.tar.gz
external_libcxx-d24c465beaec2fe9a0e365e6379cd5d3acaeb2ca.tar.bz2
external_libcxx-d24c465beaec2fe9a0e365e6379cd5d3acaeb2ca.zip
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
Diffstat (limited to 'test/std/utilities/function.objects')
-rw-r--r--test/std/utilities/function.objects/func.memfn/member_function.pass.cpp4
-rw-r--r--test/std/utilities/function.objects/unord.hash/enum.pass.cpp4
2 files changed, 6 insertions, 2 deletions
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 <functional>
#include <cassert>
+#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 <functional>
#include <cassert>