summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-05-07 20:16:13 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-05-07 20:16:13 +0000
commit81aa5cb804590dcc0e64f2cb2a2052bcd3948b3b (patch)
treefa56e90cd370b3366026b6fea0fa1fefc411f1cd
parent9264c954003caea18ed08e09cd1f1b712aedde8a (diff)
downloadbcm5719-llvm-81aa5cb804590dcc0e64f2cb2a2052bcd3948b3b.tar.gz
bcm5719-llvm-81aa5cb804590dcc0e64f2cb2a2052bcd3948b3b.zip
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.
llvm-svn: 181347
-rw-r--r--libcxx/include/__config8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 7923f2f489d..dcddae8d1b1 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -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
OpenPOWER on IntegriCloud