From owner-svn-src-vendor@FreeBSD.ORG Tue Mar 13 14:09:16 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0344106566B; Tue, 13 Mar 2012 14:09:16 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3F88FC12; Tue, 13 Mar 2012 14:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DE9G84048274; Tue, 13 Mar 2012 14:09:16 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DE9GAE048268; Tue, 13 Mar 2012 14:09:16 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203131409.q2DE9GAE048268@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Mar 2012 14:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232924 - in vendor/libc++/dist: include include/ext include/support/win32 src X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 13 Mar 2012 14:09:16 -0000 Author: theraven Date: Tue Mar 13 14:09:15 2012 New Revision: 232924 URL: http://svn.freebsd.org/changeset/base/232924 Log: Import new version of libc++ into vendor branch. Approved by: dim (mentor) Added: vendor/libc++/dist/include/__undef_min_max Modified: vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__debug vendor/libc++/dist/include/__functional_03 vendor/libc++/dist/include/__functional_base vendor/libc++/dist/include/__functional_base_03 vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__split_buffer vendor/libc++/dist/include/__sso_allocator vendor/libc++/dist/include/__std_stream vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/atomic vendor/libc++/dist/include/bitset vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/complex vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/cstring vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/ext/hash_map vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/initializer_list vendor/libc++/dist/include/iomanip vendor/libc++/dist/include/ios vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/limits vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/map vendor/libc++/dist/include/memory vendor/libc++/dist/include/mutex vendor/libc++/dist/include/ostream vendor/libc++/dist/include/random vendor/libc++/dist/include/ratio vendor/libc++/dist/include/regex vendor/libc++/dist/include/sstream vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/support/win32/math_win32.h vendor/libc++/dist/include/support/win32/support.h vendor/libc++/dist/include/system_error vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/condition_variable.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/memory.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/random.cpp vendor/libc++/dist/src/regex.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/string.cpp vendor/libc++/dist/src/strstream.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/src/typeinfo.cpp Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__bit_reference Tue Mar 13 14:09:15 2012 (r232924) @@ -14,14 +14,16 @@ #include <__config> #include +#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; -template class __bit_const_reference; +template class __bit_iterator; +template class __bit_const_reference; template struct __has_storage_type @@ -29,22 +31,22 @@ struct __has_storage_type static const bool value = false; }; -template ::value> +template ::value> class __bit_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, false>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, false>; public: _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} @@ -66,74 +68,74 @@ public: {return operator=(static_cast(__x));} _LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, false> operator&() const _NOEXCEPT - {return __bit_iterator<_C, false>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, false>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} }; -template -class __bit_reference<_C, false> +template +class __bit_reference<_Cp, false> { }; -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, __bit_reference<_D> __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(__bit_reference<_C> __x, bool& __y) _NOEXCEPT +swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template _LIBCPP_INLINE_VISIBILITY inline void -swap(bool& __x, __bit_reference<_C> __y) _NOEXCEPT +swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT { bool __t = __x; __x = __y; __y = __t; } -template +template class __bit_const_reference { - typedef typename _C::__storage_type __storage_type; - typedef typename _C::__const_storage_pointer __storage_pointer; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::__const_storage_pointer __storage_pointer; __storage_pointer __seg_; __storage_type __mask_; #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_iterator<_C, true>; + friend class __bit_iterator<_Cp, true>; public: _LIBCPP_INLINE_VISIBILITY - __bit_const_reference(const __bit_reference<_C>& __x) _NOEXCEPT + __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} - _LIBCPP_INLINE_VISIBILITY __bit_iterator<_C, true> operator&() const _NOEXCEPT - {return __bit_iterator<_C, true>(__seg_, static_cast(__ctz(__mask_)));} + _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT + {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT @@ -144,11 +146,11 @@ private: // find -template -__bit_iterator<_C, false> -__find_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -178,11 +180,11 @@ __find_bool_true(__bit_iterator<_C, fals return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_C, false> -__find_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +__bit_iterator<_Cp, false> +__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -215,23 +217,23 @@ __find_bool_false(__bit_iterator<_C, fal return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -find(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, false> +find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __find_bool_true(__first, static_cast(__last - __first)); - return __find_bool_false(__first, static_cast(__last - __first)); + return __find_bool_true(__first, static_cast(__last - __first)); + return __find_bool_false(__first, static_cast(__last - __first)); } // count -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -258,11 +260,11 @@ __count_bool_true(__bit_iterator<_C, fal return __r; } -template -typename __bit_iterator<_C, false>::difference_type -__count_bool_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +template +typename __bit_iterator<_Cp, false>::difference_type +__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -289,23 +291,23 @@ __count_bool_false(__bit_iterator<_C, fa return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_C, false>::difference_type -count(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, false>::difference_type +count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) { if (static_cast(__value_)) - return __count_bool_true(__first, static_cast(__last - __first)); - return __count_bool_false(__first, static_cast(__last - __first)); + return __count_bool_true(__first, static_cast(__last - __first)); + return __count_bool_false(__first, static_cast(__last - __first)); } // fill_n -template +template void -__fill_n_false(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -331,11 +333,11 @@ __fill_n_false(__bit_iterator<_C, false> } } -template +template void -__fill_n_true(__bit_iterator<_C, false> __first, typename _C::size_type __n) +__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_C, false> _It; + typedef __bit_iterator<_Cp, false> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -361,10 +363,10 @@ __fill_n_true(__bit_iterator<_C, false> } } -template +template _LIBCPP_INLINE_VISIBILITY inline void -fill_n(__bit_iterator<_C, false> __first, typename _C::size_type __n, bool __value_) +fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) { if (__n > 0) { @@ -377,22 +379,22 @@ fill_n(__bit_iterator<_C, false> __first // fill -template +template inline _LIBCPP_INLINE_VISIBILITY void -fill(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __last, bool __value_) +fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_) { - _VSTD::fill_n(__first, static_cast(__last - __first), __value_); + _VSTD::fill_n(__first, static_cast(__last - __first), __value_); } // copy -template -__bit_iterator<_C, false> -__copy_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -434,12 +436,12 @@ __copy_aligned(__bit_iterator<_C, _IsCon return __result; } -template -__bit_iterator<_C, false> -__copy_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -512,10 +514,10 @@ __copy_unaligned(__bit_iterator<_C, _IsC return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__first.__ctz_ == __result.__ctz_) return __copy_aligned(__first, __last, __result); @@ -524,12 +526,12 @@ copy(__bit_iterator<_C, _IsConst> __firs // copy_backward -template -__bit_iterator<_C, false> -__copy_backward_aligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -571,12 +573,12 @@ __copy_backward_aligned(__bit_iterator<_ return __result; } -template -__bit_iterator<_C, false> -__copy_backward_unaligned(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, - __bit_iterator<_C, false> __result) +template +__bit_iterator<_Cp, false> +__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, + __bit_iterator<_Cp, false> __result) { - typedef __bit_iterator<_C, _IsConst> _In; + typedef __bit_iterator<_Cp, _IsConst> _In; typedef typename _In::difference_type difference_type; typedef typename _In::__storage_type __storage_type; static const unsigned __bits_per_word = _In::__bits_per_word; @@ -635,7 +637,7 @@ __copy_backward_unaligned(__bit_iterator { __m = ~__storage_type(0) << (__bits_per_word - __n); __storage_type __b = *--__last.__seg_ & __m; - unsigned __clz_r = __bits_per_word - __result.__ctz_; + __clz_r = __bits_per_word - __result.__ctz_; __storage_type __dn = _VSTD::min(__n, static_cast(__result.__ctz_)); __m = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r); *__result.__seg_ &= ~__m; @@ -657,10 +659,10 @@ __copy_backward_unaligned(__bit_iterator return __result; } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -copy_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__last.__ctz_ == __result.__ctz_) return __copy_backward_aligned(__first, __last, __result); @@ -669,20 +671,20 @@ copy_backward(__bit_iterator<_C, _IsCons // move -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } // move_backward -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_C, false> -move_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst> __last, __bit_iterator<_C, false> __result) +__bit_iterator<_Cp, false> +move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { return _VSTD::copy(__first, __last, __result); } @@ -852,34 +854,33 @@ swap_ranges(__bit_iterator<__C1, false> // rotate -template +template struct __bit_array { - typedef typename _C::difference_type difference_type; - typedef typename _C::__storage_type __storage_type; - typedef typename _C::iterator iterator; - static const unsigned __bits_per_word = _C::__bits_per_word; - static const unsigned _N = 4; + typedef typename _Cp::difference_type difference_type; + typedef typename _Cp::__storage_type __storage_type; + typedef typename _Cp::iterator iterator; + static const unsigned __bits_per_word = _Cp::__bits_per_word; + static const unsigned _Np = 4; difference_type __size_; - __storage_type __word_[_N]; + __storage_type __word_[_Np]; _LIBCPP_INLINE_VISIBILITY static difference_type capacity() - {return static_cast(_N * __bits_per_word);} + {return static_cast(_Np * __bits_per_word);} _LIBCPP_INLINE_VISIBILITY explicit __bit_array(difference_type __s) : __size_(__s) {} _LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__word_, 0);} _LIBCPP_INLINE_VISIBILITY iterator end() {return iterator(__word_ + __size_ / __bits_per_word, static_cast(__size_ % __bits_per_word));} }; -template -__bit_iterator<_C, false> -rotate(__bit_iterator<_C, false> __first, __bit_iterator<_C, false> __middle, __bit_iterator<_C, false> __last) +template +__bit_iterator<_Cp, false> +rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last) { - typedef __bit_iterator<_C, false> _I1; + typedef __bit_iterator<_Cp, false> _I1; typedef typename _I1::difference_type difference_type; typedef typename _I1::__storage_type __storage_type; - static const unsigned __bits_per_word = _I1::__bits_per_word; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; @@ -887,16 +888,16 @@ rotate(__bit_iterator<_C, false> __first { if (__d1 <= __d2) { - if (__d1 <= __bit_array<_C>::capacity()) + if (__d1 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d1); + __bit_array<_Cp> __b(__d1); _VSTD::copy(__first, __middle, __b.begin()); _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first)); break; } else { - __bit_iterator<_C, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); + __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); __first = __middle; __middle = __mp; __d2 -= __d1; @@ -904,16 +905,16 @@ rotate(__bit_iterator<_C, false> __first } else { - if (__d2 <= __bit_array<_C>::capacity()) + if (__d2 <= __bit_array<_Cp>::capacity()) { - __bit_array<_C> __b(__d2); + __bit_array<_Cp> __b(__d2); _VSTD::copy(__middle, __last, __b.begin()); _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last)); break; } else { - __bit_iterator<_C, false> __mp = __first + __d2; + __bit_iterator<_Cp, false> __mp = __first + __d2; _VSTD::swap_ranges(__first, __mp, __middle); __first = __mp; __d1 -= __d2; @@ -925,12 +926,12 @@ rotate(__bit_iterator<_C, false> __first // equal -template +template bool -__equal_unaligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1003,12 +1004,12 @@ __equal_unaligned(__bit_iterator<_C, tru return true; } -template +template bool -__equal_aligned(__bit_iterator<_C, true> __first1, __bit_iterator<_C, true> __last1, - __bit_iterator<_C, true> __first2) +__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, + __bit_iterator<_Cp, true> __first2) { - typedef __bit_iterator<_C, true> _It; + typedef __bit_iterator<_Cp, true> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1046,31 +1047,31 @@ __equal_aligned(__bit_iterator<_C, true> return true; } -template +template inline _LIBCPP_INLINE_VISIBILITY bool -equal(__bit_iterator<_C, _IC1> __first1, __bit_iterator<_C, _IC1> __last1, __bit_iterator<_C, _IC2> __first2) +equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) { if (__first1.__ctz_ == __first2.__ctz_) return __equal_aligned(__first1, __last1, __first2); return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: - typedef typename _C::difference_type difference_type; + typedef typename _Cp::difference_type difference_type; typedef bool value_type; typedef __bit_iterator pointer; - typedef typename conditional<_IsConst, __bit_const_reference<_C>, __bit_reference<_C> >::type reference; + typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference; typedef random_access_iterator_tag iterator_category; private: - typedef typename _C::__storage_type __storage_type; - typedef typename conditional<_IsConst, typename _C::__const_storage_pointer, - typename _C::__storage_pointer>::type __storage_pointer; - static const unsigned __bits_per_word = _C::__bits_per_word; + typedef typename _Cp::__storage_type __storage_type; + typedef typename conditional<_IsConst, typename _Cp::__const_storage_pointer, + typename _Cp::__storage_pointer>::type __storage_pointer; + static const unsigned __bits_per_word = _Cp::__bits_per_word; __storage_pointer __seg_; unsigned __ctz_; @@ -1079,7 +1080,7 @@ public: _LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY - __bit_iterator(const __bit_iterator<_C, false>& __it) _NOEXCEPT + __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {} _LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT @@ -1187,34 +1188,34 @@ private: : __seg_(__s), __ctz_(__ctz) {} #if defined(__clang__) - friend typename _C::__self; + friend typename _Cp::__self; #else - friend class _C::__self; + friend class _Cp::__self; #endif - friend class __bit_reference<_C>; - friend class __bit_const_reference<_C>; - friend class __bit_iterator<_C, true>; - template friend struct __bit_array; - template friend void __fill_n_false(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend void __fill_n_true(__bit_iterator<_D, false> __first, typename _D::size_type __n); - template friend __bit_iterator<_D, false> __copy_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_aligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> __copy_backward_unaligned(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); - template friend __bit_iterator<_D, false> copy_backward(__bit_iterator<_D, _IC> __first, - __bit_iterator<_D, _IC> __last, - __bit_iterator<_D, false> __result); + friend class __bit_reference<_Cp>; + friend class __bit_const_reference<_Cp>; + friend class __bit_iterator<_Cp, true>; + template friend struct __bit_array; + template friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); + template friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); + template friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first, + __bit_iterator<_Dp, _IC> __last, + __bit_iterator<_Dp, false> __result); template friend __bit_iterator<__C2, false> __swap_ranges_aligned(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); @@ -1224,22 +1225,22 @@ private: template friend __bit_iterator<__C2, false> swap_ranges(__bit_iterator<__C1, false>, __bit_iterator<__C1, false>, __bit_iterator<__C2, false>); - template friend __bit_iterator<_D, false> rotate(__bit_iterator<_D, false>, - __bit_iterator<_D, false>, - __bit_iterator<_D, false>); - template friend bool __equal_aligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool __equal_unaligned(__bit_iterator<_D, true>, - __bit_iterator<_D, true>, - __bit_iterator<_D, true>); - template friend bool equal(__bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC1>, - __bit_iterator<_D, _IC2>); - template friend __bit_iterator<_D, false> __find_bool_true(__bit_iterator<_D, false>, - typename _D::size_type); - template friend __bit_iterator<_D, false> __find_bool_false(__bit_iterator<_D, false>, - typename _D::size_type); + template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>, + __bit_iterator<_Dp, false>); + template friend bool __equal_aligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>, + __bit_iterator<_Dp, true>); + template friend bool equal(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + typename _Dp::size_type); + template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__config Tue Mar 13 14:09:15 2012 (r232924) @@ -58,6 +58,17 @@ # endif #endif // _WIN32 +#ifdef __sun__ +# include +# ifdef _LITTLE_ENDIAN +# define _LIBCPP_LITTLE_ENDIAN 1 +# define _LIBCPP_BIG_ENDIAN 0 +# else +# define _LIBCPP_LITTLE_ENDIAN 0 +# define _LIBCPP_BIG_ENDIAN 1 +# endif +#endif // __sun__ + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -160,6 +171,10 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_RTTI #endif +#if !(__has_feature(cxx_strong_enums)) +#define _LIBCPP_HAS_NO_STRONG_ENUMS +#endif + #if !(__has_feature(cxx_decltype)) #define _LIBCPP_HAS_NO_DECLTYPE #endif @@ -223,6 +238,7 @@ typedef __char32_t char32_t; #if __has_feature(objc_arc_weak) #define _LIBCPP_HAS_OBJC_ARC_WEAK +#define _LIBCPP_HAS_NO_STRONG_ENUMS #endif #if !(__has_feature(cxx_constexpr)) @@ -371,7 +387,25 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __APPLE__ || __FreeBSD__ || _WIN32 +#if __has_feature(cxx_explicit_conversions) +# define _LIBCPP_EXPLICIT explicit +#else +# define _LIBCPP_EXPLICIT +#endif + +#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _ +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ + _ __v_; \ + _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ + }; +#else // _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) +#endif // _LIBCPP_HAS_NO_STRONG_ENUMS + +#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__ #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif #if __FreeBSD__ @@ -382,7 +416,7 @@ template struct __static_asse #define _LIBCPP_HAS_DEFAULTRUNELOCALE #endif -#if __APPLE__ || __FreeBSD__ +#if __APPLE__ || __FreeBSD__ || __sun__ #define _LIBCPP_WCTYPE_IS_MASK #endif Modified: vendor/libc++/dist/include/__debug ============================================================================== --- vendor/libc++/dist/include/__debug Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__debug Tue Mar 13 14:09:15 2012 (r232924) @@ -83,8 +83,8 @@ _C_node<_Cont>::__dereferenceable(const { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__dereferenceable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__dereferenceable(__j); } template @@ -93,8 +93,8 @@ _C_node<_Cont>::__decrementable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__decrementable(__j); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__decrementable(__j); } template @@ -103,8 +103,8 @@ _C_node<_Cont>::__addable(const void* __ { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__addable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__addable(__j, __n); } template @@ -113,8 +113,8 @@ _C_node<_Cont>::__subscriptable(const vo { typedef typename _Cont::const_iterator iterator; const iterator* __j = static_cast(__i); - _Cont* _C = static_cast<_Cont*>(__c_); - return _C->__subscriptable(__j, __n); + _Cont* _Cp = static_cast<_Cont*>(__c_); + return _Cp->__subscriptable(__j, __n); } class _LIBCPP_VISIBLE __libcpp_db Modified: vendor/libc++/dist/include/__functional_03 ============================================================================== --- vendor/libc++/dist/include/__functional_03 Tue Mar 13 13:22:03 2012 (r232923) +++ vendor/libc++/dist/include/__functional_03 Tue Mar 13 14:09:15 2012 (r232924) @@ -60,140 +60,140 @@ public: } }; -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R _T::*> -mem_fn(_R _T::* __pm) +__mem_fn<_Rp _Tp::*> +mem_fn(_Rp _Tp::* __pm) { - return __mem_fn<_R _T::*>(__pm); + return __mem_fn<_Rp _Tp::*>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)()) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)()) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0)) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0)) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1)) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2)) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2)) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) const) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) const) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) const) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) const) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) const) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0)> -mem_fn(_R (_T::* __pm)(_A0) volatile) +__mem_fn<_Rp (_Tp::*)(_A0)> +mem_fn(_Rp (_Tp::* __pm)(_A0) volatile) { - return __mem_fn<_R (_T::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1)> -mem_fn(_R (_T::* __pm)(_A0, _A1) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)(_A0, _A1, _A2)> -mem_fn(_R (_T::* __pm)(_A0, _A1, _A2) volatile) +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) volatile) { - return __mem_fn<_R (_T::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_R (_T::*)()> -mem_fn(_R (_T::* __pm)() const volatile) +__mem_fn<_Rp (_Tp::*)()> +mem_fn(_Rp (_Tp::* __pm)() const volatile) { - return __mem_fn<_R (_T::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)()>(__pm); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***