summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-02-07 15:45:28 +0000
committertheraven <theraven@FreeBSD.org>2013-02-07 15:45:28 +0000
commitd19c702291ff3bd9e769a152e7db96e17f5167f7 (patch)
tree52637438fa031aa783147d9ac30dac90131dffdf /contrib/libc++/include
parent0ab90cb3f6b7aa6a5a725c5aadaee31d34eaca96 (diff)
downloadFreeBSD-src-d19c702291ff3bd9e769a152e7db96e17f5167f7.zip
FreeBSD-src-d19c702291ff3bd9e769a152e7db96e17f5167f7.tar.gz
Import new libc++ to head. Various small fixes and cleanups.
MFC after: 2 weeks
Diffstat (limited to 'contrib/libc++/include')
-rw-r--r--contrib/libc++/include/__config6
-rw-r--r--contrib/libc++/include/algorithm4
-rw-r--r--contrib/libc++/include/array3
-rw-r--r--contrib/libc++/include/atomic22
-rw-r--r--contrib/libc++/include/cmath90
-rw-r--r--contrib/libc++/include/functional2
-rw-r--r--contrib/libc++/include/future8
-rw-r--r--contrib/libc++/include/istream1
-rw-r--r--contrib/libc++/include/iterator4
-rw-r--r--contrib/libc++/include/limits188
-rw-r--r--contrib/libc++/include/locale20
-rw-r--r--contrib/libc++/include/memory5
-rw-r--r--contrib/libc++/include/ostream13
-rw-r--r--contrib/libc++/include/random122
-rw-r--r--contrib/libc++/include/regex21
-rw-r--r--contrib/libc++/include/string2
-rw-r--r--contrib/libc++/include/type_traits23
-rw-r--r--contrib/libc++/include/vector6
18 files changed, 459 insertions, 81 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config
index 203be76..8617b86 100644
--- a/contrib/libc++/include/__config
+++ b/contrib/libc++/include/__config
@@ -66,6 +66,12 @@
# endif
#endif // _WIN32
+#ifdef __linux__
+# if defined(__GNUC__) && _GNUC_VER >= 403
+# define _LIBCP_HAS_IS_BASE_OF
+# endif
+#endif
+
#ifdef __sun__
# include <sys/isa_defs.h>
# ifdef _LITTLE_ENDIAN
diff --git a/contrib/libc++/include/algorithm b/contrib/libc++/include/algorithm
index 0f6107b..e24f979 100644
--- a/contrib/libc++/include/algorithm
+++ b/contrib/libc++/include/algorithm
@@ -1528,10 +1528,10 @@ copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
// copy_backward
-template <class _InputIterator, class _OutputIterator>
+template <class _BidirectionalIterator, class _OutputIterator>
inline _LIBCPP_INLINE_VISIBILITY
_OutputIterator
-__copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
+__copy_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
{
while (__first != __last)
*--__result = *--__last;
diff --git a/contrib/libc++/include/array b/contrib/libc++/include/array
index 029bfd0..f4a3020 100644
--- a/contrib/libc++/include/array
+++ b/contrib/libc++/include/array
@@ -310,6 +310,7 @@ _LIBCPP_INLINE_VISIBILITY inline
_Tp&
get(array<_Tp, _Size>& __a) _NOEXCEPT
{
+ static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array)");
return __a[_Ip];
}
@@ -318,6 +319,7 @@ _LIBCPP_INLINE_VISIBILITY inline
const _Tp&
get(const array<_Tp, _Size>& __a) _NOEXCEPT
{
+ static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array)");
return __a[_Ip];
}
@@ -328,6 +330,7 @@ _LIBCPP_INLINE_VISIBILITY inline
_Tp&&
get(array<_Tp, _Size>&& __a) _NOEXCEPT
{
+ static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)");
return _VSTD::move(__a[_Ip]);
}
diff --git a/contrib/libc++/include/atomic b/contrib/libc++/include/atomic
index 6dffdb2..db67e76 100644
--- a/contrib/libc++/include/atomic
+++ b/contrib/libc++/include/atomic
@@ -33,6 +33,7 @@ template <class T> T kill_dependency(T y) noexcept;
// lock-free property
+#define ATOMIC_BOOL_LOCK_FREE unspecified
#define ATOMIC_CHAR_LOCK_FREE unspecified
#define ATOMIC_CHAR16_T_LOCK_FREE unspecified
#define ATOMIC_CHAR32_T_LOCK_FREE unspecified
@@ -41,6 +42,7 @@ template <class T> T kill_dependency(T y) noexcept;
#define ATOMIC_INT_LOCK_FREE unspecified
#define ATOMIC_LONG_LOCK_FREE unspecified
#define ATOMIC_LLONG_LOCK_FREE unspecified
+#define ATOMIC_POINTER_LOCK_FREE unspecified
// flag type and operations
@@ -472,6 +474,7 @@ template <class T>
// Atomics for standard typedef types
+typedef atomic<bool> atomic_bool;
typedef atomic<char> atomic_char;
typedef atomic<signed char> atomic_schar;
typedef atomic<unsigned char> atomic_uchar;
@@ -1454,6 +1457,7 @@ atomic_signal_fence(memory_order __m) _NOEXCEPT
// Atomics for standard typedef types
+typedef atomic<bool> atomic_bool;
typedef atomic<char> atomic_char;
typedef atomic<signed char> atomic_schar;
typedef atomic<unsigned char> atomic_uchar;
@@ -1499,14 +1503,16 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
// lock-free property
-#define ATOMIC_CHAR_LOCK_FREE 0
-#define ATOMIC_CHAR16_T_LOCK_FREE 0
-#define ATOMIC_CHAR32_T_LOCK_FREE 0
-#define ATOMIC_WCHAR_T_LOCK_FREE 0
-#define ATOMIC_SHORT_LOCK_FREE 0
-#define ATOMIC_INT_LOCK_FREE 0
-#define ATOMIC_LONG_LOCK_FREE 0
-#define ATOMIC_LLONG_LOCK_FREE 0
+#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
#endif // !__has_feature(cxx_atomic)
diff --git a/contrib/libc++/include/cmath b/contrib/libc++/include/cmath
index d3fbfe6..bd60344 100644
--- a/contrib/libc++/include/cmath
+++ b/contrib/libc++/include/cmath
@@ -137,21 +137,21 @@ long double tanhl(long double x);
// C99
-bool signbit(floating_point x);
+bool signbit(arithmetic x);
-int fpclassify(floating_point x);
+int fpclassify(arithmetic x);
-bool isfinite(floating_point x);
-bool isinf(floating_point x);
-bool isnan(floating_point x);
-bool isnormal(floating_point x);
+bool isfinite(arithmetic x);
+bool isinf(arithmetic x);
+bool isnan(arithmetic x);
+bool isnormal(arithmetic x);
-bool isgreater(floating_point x, floating_point y);
-bool isgreaterequal(floating_point x, floating_point y);
-bool isless(floating_point x, floating_point y);
-bool islessequal(floating_point x, floating_point y);
-bool islessgreater(floating_point x, floating_point y);
-bool isunordered(floating_point x, floating_point y);
+bool isgreater(arithmetic x, arithmetic y);
+bool isgreaterequal(arithmetic x, arithmetic y);
+bool isless(arithmetic x, arithmetic y);
+bool islessequal(arithmetic x, arithmetic y);
+bool islessgreater(arithmetic x, arithmetic y);
+bool isunordered(arithmetic x, arithmetic y);
floating_point acosh (arithmetic x);
float acoshf(float x);
@@ -325,10 +325,10 @@ __libcpp_signbit(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
signbit(_A1 __x) _NOEXCEPT
{
- return __libcpp_signbit(__x);
+ return __libcpp_signbit((typename std::__promote<_A1>::type)__x);
}
#endif // signbit
@@ -349,10 +349,10 @@ __libcpp_fpclassify(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, int>::type
fpclassify(_A1 __x) _NOEXCEPT
{
- return __libcpp_fpclassify(__x);
+ return __libcpp_fpclassify((typename std::__promote<_A1>::type)__x);
}
#endif // fpclassify
@@ -373,10 +373,10 @@ __libcpp_isfinite(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
isfinite(_A1 __x) _NOEXCEPT
{
- return __libcpp_isfinite(__x);
+ return __libcpp_isfinite((typename std::__promote<_A1>::type)__x);
}
#endif // isfinite
@@ -397,10 +397,10 @@ __libcpp_isinf(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
isinf(_A1 __x) _NOEXCEPT
{
- return __libcpp_isinf(__x);
+ return __libcpp_isinf((typename std::__promote<_A1>::type)__x);
}
#endif // isinf
@@ -421,10 +421,10 @@ __libcpp_isnan(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
isnan(_A1 __x) _NOEXCEPT
{
- return __libcpp_isnan(__x);
+ return __libcpp_isnan((typename std::__promote<_A1>::type)__x);
}
#endif // isnan
@@ -445,10 +445,10 @@ __libcpp_isnormal(_A1 __x) _NOEXCEPT
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
+typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
isnormal(_A1 __x) _NOEXCEPT
{
- return __libcpp_isnormal(__x);
+ return __libcpp_isnormal((typename std::__promote<_A1>::type)__x);
}
#endif // isnormal
@@ -471,13 +471,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
isgreater(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_isgreater(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_isgreater((type)__x, (type)__y);
}
#endif // isgreater
@@ -500,13 +501,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_isgreaterequal(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_isgreaterequal((type)__x, (type)__y);
}
#endif // isgreaterequal
@@ -529,13 +531,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
isless(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_isless(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_isless((type)__x, (type)__y);
}
#endif // isless
@@ -558,13 +561,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
islessequal(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_islessequal(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_islessequal((type)__x, (type)__y);
}
#endif // islessequal
@@ -587,13 +591,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
islessgreater(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_islessgreater(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_islessgreater((type)__x, (type)__y);
}
#endif // islessgreater
@@ -616,13 +621,14 @@ template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
typename std::enable_if
<
- std::is_floating_point<_A1>::value &&
- std::is_floating_point<_A2>::value,
+ std::is_arithmetic<_A1>::value &&
+ std::is_arithmetic<_A2>::value,
bool
>::type
isunordered(_A1 __x, _A2 __y) _NOEXCEPT
{
- return __libcpp_isunordered(__x, __y);
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __libcpp_isunordered((type)__x, (type)__y);
}
#endif // isunordered
diff --git a/contrib/libc++/include/functional b/contrib/libc++/include/functional
index ec5c5e5..3bee1ed 100644
--- a/contrib/libc++/include/functional
+++ b/contrib/libc++/include/functional
@@ -1088,7 +1088,7 @@ class _LIBCPP_VISIBLE function<_Rp(_ArgTypes...)>
public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
{
typedef __function::__base<_Rp(_ArgTypes...)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
+ typename aligned_storage<3*sizeof(void*)>::type __buf_;
__base* __f_;
template <class _Fp>
diff --git a/contrib/libc++/include/future b/contrib/libc++/include/future
index cf552a9..fa605e7 100644
--- a/contrib/libc++/include/future
+++ b/contrib/libc++/include/future
@@ -470,7 +470,11 @@ public:
{return (__state_ & __constructed) || (__exception_ != nullptr);}
_LIBCPP_INLINE_VISIBILITY
- void __set_future_attached() {__state_ |= __future_attached;}
+ void __set_future_attached()
+ {
+ lock_guard<mutex> __lk(__mut_);
+ __state_ |= __future_attached;
+ }
_LIBCPP_INLINE_VISIBILITY
bool __has_future_attached() const {return __state_ & __future_attached;}
@@ -1753,7 +1757,7 @@ template<class _Rp, class ..._ArgTypes>
class __packaged_task_function<_Rp(_ArgTypes...)>
{
typedef __packaged_task_base<_Rp(_ArgTypes...)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
+ typename aligned_storage<3*sizeof(void*)>::type __buf_;
__base* __f_;
public:
diff --git a/contrib/libc++/include/istream b/contrib/libc++/include/istream
index dc1c52b..3979e14 100644
--- a/contrib/libc++/include/istream
+++ b/contrib/libc++/include/istream
@@ -1243,6 +1243,7 @@ template<class _CharT, class _Traits>
streamsize
basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
{
+ __gc_ = 0;
streamsize __c = this->rdbuf()->in_avail();
switch (__c)
{
diff --git a/contrib/libc++/include/iterator b/contrib/libc++/include/iterator
index bc0ce47..b23310b 100644
--- a/contrib/libc++/include/iterator
+++ b/contrib/libc++/include/iterator
@@ -822,9 +822,9 @@ private:
public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
_LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
- : __sbuf_(__s.rdbuf()) {__test_for_eof();}
+ : __sbuf_(__s.rdbuf()) {}
_LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
- : __sbuf_(__s) {__test_for_eof();}
+ : __sbuf_(__s) {}
_LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
: __sbuf_(__p.__sbuf_) {}
diff --git a/contrib/libc++/include/limits b/contrib/libc++/include/limits
index 68e6336..f089a79 100644
--- a/contrib/libc++/include/limits
+++ b/contrib/libc++/include/limits
@@ -479,6 +479,53 @@ public:
};
template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
+
+template <class _Tp>
class _LIBCPP_VISIBLE numeric_limits<const _Tp>
: private numeric_limits<_Tp>
{
@@ -525,6 +572,53 @@ public:
};
template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
+
+template <class _Tp>
class _LIBCPP_VISIBLE numeric_limits<volatile _Tp>
: private numeric_limits<_Tp>
{
@@ -571,6 +665,53 @@ public:
};
template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
+
+template <class _Tp>
class _LIBCPP_VISIBLE numeric_limits<const volatile _Tp>
: private numeric_limits<_Tp>
{
@@ -616,6 +757,53 @@ public:
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
};
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
+template <class _Tp>
+ const int numeric_limits<const volatile _Tp>::max_digits10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
+template <class _Tp>
+ _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_LIMITS
diff --git a/contrib/libc++/include/locale b/contrib/libc++/include/locale
index f04a36b..9189375 100644
--- a/contrib/libc++/include/locale
+++ b/contrib/libc++/include/locale
@@ -354,7 +354,7 @@ size_t __mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
#endif
}
-_LIBCPP_ALWAYS_INLINE inline
+inline
int __sprintf_l(char *__s, locale_t __l, const char *__format, ...) {
va_list __va;
va_start(__va, __format);
@@ -368,7 +368,7 @@ int __sprintf_l(char *__s, locale_t __l, const char *__format, ...) {
return __res;
}
-_LIBCPP_ALWAYS_INLINE inline
+inline
int __snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
va_list __va;
va_start(__va, __format);
@@ -382,7 +382,7 @@ int __snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...)
return __res;
}
-_LIBCPP_ALWAYS_INLINE inline
+inline
int __asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
va_list __va;
va_start(__va, __format);
@@ -396,7 +396,7 @@ int __asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
return __res;
}
-_LIBCPP_ALWAYS_INLINE inline
+inline
int __sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
va_list __va;
va_start(__va, __format);
@@ -830,11 +830,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
{
if (__a != __a_end)
{
- int __save_errno = errno;
+ typename remove_reference<decltype(errno)>::type __save_errno = errno;
errno = 0;
char *__p2;
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
- int __current_errno = errno;
+ typename remove_reference<decltype(errno)>::type __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
if (__p2 != __a_end)
@@ -870,11 +870,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
__err = ios_base::failbit;
return 0;
}
- int __save_errno = errno;
+ typename remove_reference<decltype(errno)>::type __save_errno = errno;
errno = 0;
char *__p2;
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
- int __current_errno = errno;
+ typename remove_reference<decltype(errno)>::type __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
if (__p2 != __a_end)
@@ -2895,6 +2895,10 @@ template <class _CharT, bool _International>
locale::id
moneypunct<_CharT, _International>::id;
+template <class _CharT, bool _International>
+const bool
+moneypunct<_CharT, _International>::intl;
+
_LIBCPP_EXTERN_TEMPLATE(class moneypunct<char, false>)
_LIBCPP_EXTERN_TEMPLATE(class moneypunct<char, true>)
_LIBCPP_EXTERN_TEMPLATE(class moneypunct<wchar_t, false>)
diff --git a/contrib/libc++/include/memory b/contrib/libc++/include/memory
index 4c12ad9..f80d699 100644
--- a/contrib/libc++/include/memory
+++ b/contrib/libc++/include/memory
@@ -1571,7 +1571,10 @@ struct _LIBCPP_VISIBLE allocator_traits
__construct_backward(allocator_type& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __end2)
{
while (__end1 != __begin1)
- construct(__a, _VSTD::__to_raw_pointer(--__end2), _VSTD::move_if_noexcept(*--__end1));
+ {
+ construct(__a, _VSTD::__to_raw_pointer(__end2-1), _VSTD::move_if_noexcept(*--__end1));
+ --__end2;
+ }
}
template <class _Tp>
diff --git a/contrib/libc++/include/ostream b/contrib/libc++/include/ostream
index 9d26a41..b3b6df5 100644
--- a/contrib/libc++/include/ostream
+++ b/contrib/libc++/include/ostream
@@ -1100,17 +1100,8 @@ basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
sentry __sen(*this);
if (__sen && __n)
{
- typedef ostreambuf_iterator<_CharT, _Traits> _Op;
- _Op __o(*this);
- for (; __n; --__n, ++__o, ++__s)
- {
- *__o = *__s;
- if (__o.failed())
- {
- this->setstate(ios_base::badbit);
- break;
- }
- }
+ if (this->rdbuf()->sputn(__s, __n) != __n)
+ this->setstate(ios_base::badbit);
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
diff --git a/contrib/libc++/include/random b/contrib/libc++/include/random
index d838289..04d942b 100644
--- a/contrib/libc++/include/random
+++ b/contrib/libc++/include/random
@@ -1931,6 +1931,22 @@ private:
};
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+ linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
+
+template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+ linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
+
+template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+ linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
+
+template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+ linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
+
+template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
template<class _Sseq>
void
linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q,
@@ -2230,6 +2246,90 @@ private:
template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
_UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::word_size;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::state_size;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::shift_size;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mask_bits;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::xor_mask;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_u;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_d;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_s;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_b;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_t;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_c;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_l;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::initialization_multiplier;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
+ _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::default_seed;
+
+template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
void
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
__t, __c, __l, __f>::seed(result_type __sd)
@@ -2552,6 +2652,19 @@ private:
};
template<class _UIntType, size_t __w, size_t __s, size_t __r>
+ _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
+
+template<class _UIntType, size_t __w, size_t __s, size_t __r>
+ _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
+
+template<class _UIntType, size_t __w, size_t __s, size_t __r>
+ _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
+
+template<class _UIntType, size_t __w, size_t __s, size_t __r>
+ _LIBCPP_CONSTEXPR const typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::result_type
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed;
+
+template<class _UIntType, size_t __w, size_t __s, size_t __r>
void
subtract_with_carry_engine<_UIntType, __w, __s, __r>::seed(result_type __sd,
integral_constant<unsigned, 1>)
@@ -2823,6 +2936,12 @@ public:
};
template<class _Engine, size_t __p, size_t __r>
+ _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size;
+
+template<class _Engine, size_t __p, size_t __r>
+ _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block;
+
+template<class _Engine, size_t __p, size_t __r>
typename discard_block_engine<_Engine, __p, __r>::result_type
discard_block_engine<_Engine, __p, __r>::operator()()
{
@@ -3314,6 +3433,9 @@ private:
}
};
+template<class _Engine, size_t __k>
+ _LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
+
template<class _Eng, size_t _Kp>
bool
operator==(
diff --git a/contrib/libc++/include/regex b/contrib/libc++/include/regex
index 7505f2e..982500f 100644
--- a/contrib/libc++/include/regex
+++ b/contrib/libc++/include/regex
@@ -2843,6 +2843,27 @@ private:
};
template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::icase;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::nosubs;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::optimize;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::collate;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::ECMAScript;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::basic;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::extended;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::awk;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::grep;
+template <class _CharT, class _Traits>
+ const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::egrep;
+
+template <class _CharT, class _Traits>
void
basic_regex<_CharT, _Traits>::swap(basic_regex& __r)
{
diff --git a/contrib/libc++/include/string b/contrib/libc++/include/string
index 5bf42f0..1a70467 100644
--- a/contrib/libc++/include/string
+++ b/contrib/libc++/include/string
@@ -3374,7 +3374,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
{
const_pointer __p = data();
const_pointer __pe = __p + __sz;
- for (const_pointer __ps = __p + __pos; __p != __pe; ++__ps)
+ for (const_pointer __ps = __p + __pos; __ps != __pe; ++__ps)
if (!traits_type::eq(*__ps, __c))
return static_cast<size_type>(__ps - __p);
}
diff --git a/contrib/libc++/include/type_traits b/contrib/libc++/include/type_traits
index 26c37df..8f1c602 100644
--- a/contrib/libc++/include/type_traits
+++ b/contrib/libc++/include/type_traits
@@ -617,7 +617,28 @@ struct _LIBCPP_VISIBLE is_base_of
#else // __has_feature(is_base_of)
-#error is_base_of not implemented.
+namespace __is_base_of_imp
+{
+template <class _Tp>
+struct _Dst
+{
+ _Dst(const volatile _Tp &);
+};
+template <class _Tp>
+struct _Src
+{
+ operator const volatile _Tp &();
+ template <class _Up> operator const _Dst<_Up> &();
+};
+template <size_t> struct __one { typedef char type; };
+template <class _Bp, class _Dp> typename __one<sizeof(_Dst<_Bp>(declval<_Src<_Dp> >()))>::type __test(int);
+template <class _Bp, class _Dp> __two __test(...);
+}
+
+template <class _Bp, class _Dp>
+struct _LIBCPP_VISIBLE is_base_of
+ : public integral_constant<bool, is_class<_Bp>::value &&
+ sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
#endif // __has_feature(is_base_of)
diff --git a/contrib/libc++/include/vector b/contrib/libc++/include/vector
index 0c28068..876b7e5 100644
--- a/contrib/libc++/include/vector
+++ b/contrib/libc++/include/vector
@@ -1458,7 +1458,8 @@ vector<_Tp, _Allocator>::__push_back_slow_path(_Up& __x)
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
// __v.push_back(_VSTD::forward<_Up>(__x));
- __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_++), _VSTD::forward<_Up>(__x));
+ __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_), _VSTD::forward<_Up>(__x));
+ __v.__end_++;
__swap_out_circular_buffer(__v);
}
@@ -1505,7 +1506,8 @@ vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args)
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
// __v.emplace_back(_VSTD::forward<_Args>(__args)...);
- __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_++), _VSTD::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(__v.__end_), _VSTD::forward<_Args>(__args)...);
+ __v.__end_++;
__swap_out_circular_buffer(__v);
}
OpenPOWER on IntegriCloud