From owner-svn-src-vendor@FreeBSD.ORG Thu Feb 7 13:09:23 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DADA348B; Thu, 7 Feb 2013 13:09:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCFFED56; Thu, 7 Feb 2013 13:09:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r17D9NTD056213; Thu, 7 Feb 2013 13:09:23 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r17D9KGR056184; Thu, 7 Feb 2013 13:09:20 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201302071309.r17D9KGR056184@svn.freebsd.org> From: David Chisnall Date: Thu, 7 Feb 2013 13:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r246468 - in vendor/libc++/dist: include src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2013 13:09:23 -0000 Author: theraven Date: Thu Feb 7 13:09:19 2013 New Revision: 246468 URL: http://svnweb.freebsd.org/changeset/base/246468 Log: Import new libc++ to vendor branch. Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/array vendor/libc++/dist/include/atomic vendor/libc++/dist/include/cmath vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/limits vendor/libc++/dist/include/locale vendor/libc++/dist/include/memory vendor/libc++/dist/include/ostream vendor/libc++/dist/include/random vendor/libc++/dist/include/regex vendor/libc++/dist/include/string vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/vector vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/debug.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/hash.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/string.cpp vendor/libc++/dist/src/thread.cpp Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/__config Thu Feb 7 13:09:19 2013 (r246468) @@ -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 # ifdef _LITTLE_ENDIAN Modified: vendor/libc++/dist/include/algorithm ============================================================================== --- vendor/libc++/dist/include/algorithm Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/algorithm Thu Feb 7 13:09:19 2013 (r246468) @@ -1528,10 +1528,10 @@ copy(_InputIterator __first, _InputItera // copy_backward -template +template 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; Modified: vendor/libc++/dist/include/array ============================================================================== --- vendor/libc++/dist/include/array Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/array Thu Feb 7 13:09:19 2013 (r246468) @@ -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]); } Modified: vendor/libc++/dist/include/atomic ============================================================================== --- vendor/libc++/dist/include/atomic Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/atomic Thu Feb 7 13:09:19 2013 (r246468) @@ -33,6 +33,7 @@ template T kill_dependency(T y // 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 T kill_dependency(T y #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 // Atomics for standard typedef types +typedef atomic atomic_bool; typedef atomic atomic_char; typedef atomic atomic_schar; typedef atomic atomic_uchar; @@ -1454,6 +1457,7 @@ atomic_signal_fence(memory_order __m) _N // Atomics for standard typedef types +typedef atomic atomic_bool; typedef atomic atomic_char; typedef atomic atomic_schar; typedef atomic atomic_uchar; @@ -1499,14 +1503,16 @@ typedef atomic atomic_uintmax // 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) Modified: vendor/libc++/dist/include/cmath ============================================================================== --- vendor/libc++/dist/include/cmath Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/cmath Thu Feb 7 13:09:19 2013 (r246468) @@ -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 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 isfinite(arithmetic x); +bool isinf(arithmetic x); +bool isnan(arithmetic x); +bool isnormal(arithmetic x); + +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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, int>::type +typename std::enable_if::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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::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 inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::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 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 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 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 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 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 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 Modified: vendor/libc++/dist/include/functional ============================================================================== --- vendor/libc++/dist/include/functional Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/functional Thu Feb 7 13:09:19 2013 (r246468) @@ -1088,7 +1088,7 @@ class _LIBCPP_VISIBLE function<_Rp(_ArgT 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 Modified: vendor/libc++/dist/include/future ============================================================================== --- vendor/libc++/dist/include/future Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/future Thu Feb 7 13:09:19 2013 (r246468) @@ -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 __lk(__mut_); + __state_ |= __future_attached; + } _LIBCPP_INLINE_VISIBILITY bool __has_future_attached() const {return __state_ & __future_attached;} @@ -1753,7 +1757,7 @@ template 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: Modified: vendor/libc++/dist/include/istream ============================================================================== --- vendor/libc++/dist/include/istream Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/istream Thu Feb 7 13:09:19 2013 (r246468) @@ -1243,6 +1243,7 @@ template streamsize basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n) { + __gc_ = 0; streamsize __c = this->rdbuf()->in_avail(); switch (__c) { Modified: vendor/libc++/dist/include/iterator ============================================================================== --- vendor/libc++/dist/include/iterator Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/iterator Thu Feb 7 13:09:19 2013 (r246468) @@ -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_) {} Modified: vendor/libc++/dist/include/limits ============================================================================== --- vendor/libc++/dist/include/limits Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/limits Thu Feb 7 13:09:19 2013 (r246468) @@ -479,6 +479,53 @@ public: }; template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN; +template + _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps; +template + _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before; +template + _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style; + +template class _LIBCPP_VISIBLE numeric_limits : private numeric_limits<_Tp> { @@ -525,6 +572,53 @@ public: }; template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_specialized; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits10; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_digits10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_signed; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_integer; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_exact; +template + _LIBCPP_CONSTEXPR const int numeric_limits::radix; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent10; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_infinity; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_quiet_NaN; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_signaling_NaN; +template + _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits::has_denorm; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_denorm_loss; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_iec559; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_bounded; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_modulo; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::traps; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::tinyness_before; +template + _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; + +template class _LIBCPP_VISIBLE numeric_limits : private numeric_limits<_Tp> { @@ -571,6 +665,53 @@ public: }; template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_specialized; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits10; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_digits10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_signed; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_integer; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_exact; +template + _LIBCPP_CONSTEXPR const int numeric_limits::radix; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent10; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_infinity; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_quiet_NaN; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_signaling_NaN; +template + _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits::has_denorm; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_denorm_loss; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_iec559; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_bounded; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_modulo; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::traps; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::tinyness_before; +template + _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; + +template class _LIBCPP_VISIBLE numeric_limits : private numeric_limits<_Tp> { @@ -616,6 +757,53 @@ public: static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; }; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_specialized; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits; +template + _LIBCPP_CONSTEXPR const int numeric_limits::digits10; +template + const int numeric_limits::max_digits10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_signed; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_integer; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_exact; +template + _LIBCPP_CONSTEXPR const int numeric_limits::radix; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::min_exponent10; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent; +template + _LIBCPP_CONSTEXPR const int numeric_limits::max_exponent10; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_infinity; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_quiet_NaN; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_signaling_NaN; +template + _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits::has_denorm; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::has_denorm_loss; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_iec559; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_bounded; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::is_modulo; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::traps; +template + _LIBCPP_CONSTEXPR const bool numeric_limits::tinyness_before; +template + _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_LIMITS Modified: vendor/libc++/dist/include/locale ============================================================================== --- vendor/libc++/dist/include/locale Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/locale Thu Feb 7 13:09:19 2013 (r246468) @@ -354,7 +354,7 @@ size_t __mbsrtowcs_l(wchar_t *__dest, co #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, 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, 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 __ 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* __ { if (__a != __a_end) { - int __save_errno = errno; + typename remove_reference::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::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* __err = ios_base::failbit; return 0; } - int __save_errno = errno; + typename remove_reference::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::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; if (__p2 != __a_end) @@ -2895,6 +2895,10 @@ template ::id; +template +const bool +moneypunct<_CharT, _International>::intl; + _LIBCPP_EXTERN_TEMPLATE(class moneypunct) _LIBCPP_EXTERN_TEMPLATE(class moneypunct) _LIBCPP_EXTERN_TEMPLATE(class moneypunct) Modified: vendor/libc++/dist/include/memory ============================================================================== --- vendor/libc++/dist/include/memory Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/memory Thu Feb 7 13:09:19 2013 (r246468) @@ -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 Modified: vendor/libc++/dist/include/ostream ============================================================================== --- vendor/libc++/dist/include/ostream Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/ostream Thu Feb 7 13:09:19 2013 (r246468) @@ -1100,17 +1100,8 @@ basic_ostream<_CharT, _Traits>::write(co 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 } Modified: vendor/libc++/dist/include/random ============================================================================== --- vendor/libc++/dist/include/random Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/random Thu Feb 7 13:09:19 2013 (r246468) @@ -1931,6 +1931,22 @@ private: }; template + _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type + linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier; + +template + _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type + linear_congruential_engine<_UIntType, __a, __c, __m>::increment; + +template + _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type + linear_congruential_engine<_UIntType, __a, __c, __m>::modulus; + +template + _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type + linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed; + +template template void linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q, @@ -2230,6 +2246,90 @@ private: template + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 + _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 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 + _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size; + +template + _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag; + +template + _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag; + +template + _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 void subtract_with_carry_engine<_UIntType, __w, __s, __r>::seed(result_type __sd, integral_constant) @@ -2823,6 +2936,12 @@ public: }; template + _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size; + +template + _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block; + +template typename discard_block_engine<_Engine, __p, __r>::result_type discard_block_engine<_Engine, __p, __r>::operator()() { @@ -3314,6 +3433,9 @@ private: } }; +template + _LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size; + template bool operator==( Modified: vendor/libc++/dist/include/regex ============================================================================== --- vendor/libc++/dist/include/regex Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/regex Thu Feb 7 13:09:19 2013 (r246468) @@ -2843,6 +2843,27 @@ private: }; template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::icase; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::nosubs; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::optimize; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::collate; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::ECMAScript; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::basic; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::extended; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::awk; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::grep; +template + const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::egrep; + +template void basic_regex<_CharT, _Traits>::swap(basic_regex& __r) { Modified: vendor/libc++/dist/include/string ============================================================================== --- vendor/libc++/dist/include/string Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/string Thu Feb 7 13:09:19 2013 (r246468) @@ -3374,7 +3374,7 @@ basic_string<_CharT, _Traits, _Allocator { 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(__ps - __p); } Modified: vendor/libc++/dist/include/type_traits ============================================================================== --- vendor/libc++/dist/include/type_traits Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/type_traits Thu Feb 7 13:09:19 2013 (r246468) @@ -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 +struct _Dst +{ + _Dst(const volatile _Tp &); +}; +template +struct _Src +{ + operator const volatile _Tp &(); + template operator const _Dst<_Up> &(); +}; +template struct __one { typedef char type; }; +template typename __one(declval<_Src<_Dp> >()))>::type __test(int); +template __two __test(...); +} + +template +struct _LIBCPP_VISIBLE is_base_of + : public integral_constant::value && + sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {}; #endif // __has_feature(is_base_of) Modified: vendor/libc++/dist/include/vector ============================================================================== --- vendor/libc++/dist/include/vector Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/include/vector Thu Feb 7 13:09:19 2013 (r246468) @@ -1458,7 +1458,8 @@ vector<_Tp, _Allocator>::__push_back_slo allocator_type& __a = this->__alloc(); __split_buffer __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_ allocator_type& __a = this->__alloc(); __split_buffer __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); } Modified: vendor/libc++/dist/src/chrono.cpp ============================================================================== --- vendor/libc++/dist/src/chrono.cpp Thu Feb 7 12:59:38 2013 (r246467) +++ vendor/libc++/dist/src/chrono.cpp Thu Feb 7 13:09:19 2013 (r246468) @@ -24,6 +24,8 @@ namespace chrono // system_clock +const bool system_clock::is_steady; + system_clock::time_point system_clock::now() _NOEXCEPT { @@ -46,6 +48,8 @@ system_clock::from_time_t(time_t t) _NOE // steady_clock +const bool steady_clock::is_steady; + #if __APPLE__ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***