[libcxx] r181347 - 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.
Howard Hinnant
hhinnant at apple.com
Tue May 7 13:16:13 PDT 2013
Author: hhinnant
Date: Tue May 7 15:16:13 2013
New Revision: 181347
URL: http://llvm.org/viewvc/llvm-project?rev=181347&view=rev
Log:
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.
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=181347&r1=181346&r2=181347&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue May 7 15:16:13 2013
@@ -488,6 +488,14 @@ template <unsigned> struct __static_asse
# 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
More information about the cfe-commits
mailing list