Introduce _LIBCPP_STD_VER. This can be set by the client (or the clang driver). Or it will be defaulted. The default is 11 if -std= c++11 or eariler, else it will default to the current year modulo the century. We anticipate it defaulting to 14 for C++14 when the time comes. For now, post-C++11 libcxx implementations should protect themselves with #if _LIBCPP_STD_VER > 11.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2013-05-07 20:16:13 +00:00
parent dd854b2c4e
commit 5f1286f574

View File

@ -488,6 +488,14 @@ template <unsigned> struct __static_assert_check {};
# endif
#endif
#ifndef _LIBCPP_STD_VER
# if __cplusplus <= 201103L
# define _LIBCPP_STD_VER 11
# else
# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification
# endif
#endif // _LIBCPP_STD_VER
#ifdef _LIBCPP_DEBUG2
# include <__debug>
#else