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
This commit is contained in:
Marshall Clow
2017-07-17 03:02:27 +00:00
parent 893ac44f2a
commit 7afe61ad1d
2 changed files with 7 additions and 2 deletions

View File

@@ -920,8 +920,10 @@ template <unsigned> 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

View File

@@ -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