From 7afe61ad1dd29bd3db4668655502a1109b7cfea0 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 17 Jul 2017 03:02:27 +0000 Subject: [PATCH] Add case for c++2a to libc++ and test macros git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308159 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__config | 4 +++- test/support/test_macros.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/__config b/include/__config index d86b91107..38fa8c8f9 100644 --- a/include/__config +++ b/include/__config @@ -920,8 +920,10 @@ template struct __static_assert_check {}; # define _LIBCPP_STD_VER 11 # elif __cplusplus <= 201402L # define _LIBCPP_STD_VER 14 +# elif __cplusplus <= 201703L +# define _LIBCPP_STD_VER 17 # else -# define _LIBCPP_STD_VER 16 // current year, or date of c++17 ratification +# define _LIBCPP_STD_VER 18 // current year, or date of c++2a ratification # endif #endif // _LIBCPP_STD_VER diff --git a/test/support/test_macros.h b/test/support/test_macros.h index cc2918a08..95270e437 100644 --- a/test/support/test_macros.h +++ b/test/support/test_macros.h @@ -81,8 +81,11 @@ # define TEST_STD_VER 11 #elif __cplusplus <= 201402L # define TEST_STD_VER 14 +#elif __cplusplus <= 201703L +# define TEST_STD_VER 17 #else -# define TEST_STD_VER 16 // current year; greater than current standard +# define TEST_STD_VER 99 // greater than current standard +// This is deliberately different than _LIBCPP_STD_VER to discourage matching them up. #endif #endif