aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-24 19:18:17 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-24 19:18:17 +0000
commit90c3c6c2a0a0afd28cbb5e117b278bdcdebfd85f (patch)
tree57f29724ab5627bc582b314f59a0a405ba6c502b
parent375122a03b870ed00f2c4c452d8c939e2039ffec (diff)
downloadsrc-90c3c6c2a0a0afd28cbb5e117b278bdcdebfd85f.tar.gz
src-90c3c6c2a0a0afd28cbb5e117b278bdcdebfd85f.zip
Vendor import of libc++ release_40 branch r292951:vendor/libc++/libc++-release_40-r292951
Notes
Notes: svn path=/vendor/libc++/dist/; revision=312709 svn path=/vendor/libc++/libc++-release_40-r292951/; revision=312710; tag=vendor/libc++/libc++-release_40-r292951
-rw-r--r--include/__config11
-rw-r--r--include/string3
2 files changed, 12 insertions, 2 deletions
diff --git a/include/__config b/include/__config
index 973f13bc9394..ddfab31f7fac 100644
--- a/include/__config
+++ b/include/__config
@@ -103,6 +103,9 @@
#if defined(__clang__)
#define _LIBCPP_COMPILER_CLANG
+# ifndef __apple_build_version__
+# define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
+# endif
#elif defined(__GNUC__)
#define _LIBCPP_COMPILER_GCC
#elif defined(_MSC_VER)
@@ -111,6 +114,10 @@
#define _LIBCPP_COMPILER_IBM
#endif
+#ifndef _LIBCPP_CLANG_VER
+# define _LIBCPP_CLANG_VER 0
+#endif
+
// FIXME: ABI detection should be done via compiler builtin macros. This
// is just a placeholder until Clang implements such macros. For now assume
// that Windows compilers pretending to be MSVC++ target the microsoft ABI.
@@ -741,7 +748,7 @@ template <unsigned> struct __static_assert_check {};
#ifdef _LIBCPP_HAS_NO_DECLTYPE
// GCC 4.6 provides __decltype in all standard modes.
-#if !__is_identifier(__decltype) || _GNUC_VER >= 406
+#if !__is_identifier(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406
# define decltype(__x) __decltype(__x)
#else
# define decltype(__x) __typeof__(__x)
@@ -838,7 +845,7 @@ template <unsigned> struct __static_assert_check {};
#if defined(__APPLE__)
# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
-# define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIROMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+# define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
# endif
# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
# if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
diff --git a/include/string b/include/string
index 7d7994eaca1b..ba311efa5a31 100644
--- a/include/string
+++ b/include/string
@@ -818,7 +818,10 @@ public:
operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
basic_string& operator=(const basic_string& __str);
+
+#ifndef _LIBCPP_CXX03_LANG
template <class = void>
+#endif
_LIBCPP_INLINE_VISIBILITY
basic_string& operator=(__self_view __sv) {return assign(__sv);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES