From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 29 19:30:30 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FD22224; Wed, 29 Jan 2014 19:30:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE3E51D75; Wed, 29 Jan 2014 19:30:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0TJUTSd008098; Wed, 29 Jan 2014 19:30:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0TJUSWh008088; Wed, 29 Jan 2014 19:30:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201401291930.s0TJUSWh008088@svn.freebsd.org> From: Dimitry Andric Date: Wed, 29 Jan 2014 19:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261272 - in vendor/libc++/dist: . include include/experimental include/ext 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.17 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: Wed, 29 Jan 2014 19:30:30 -0000 Author: dim Date: Wed Jan 29 19:30:27 2014 New Revision: 261272 URL: http://svnweb.freebsd.org/changeset/base/261272 Log: Vendor import of libc++ tags/RELEASE_34/final r197960: https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_34/final@197960 Added: vendor/libc++/dist/include/experimental/ vendor/libc++/dist/include/experimental/dynarray vendor/libc++/dist/include/experimental/optional vendor/libc++/dist/include/shared_mutex vendor/libc++/dist/src/optional.cpp (contents, props changed) vendor/libc++/dist/src/shared_mutex.cpp (contents, props changed) Modified: vendor/libc++/dist/CREDITS.TXT 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/__std_stream vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/__tuple_03 vendor/libc++/dist/include/__undef_min_max vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/array vendor/libc++/dist/include/bitset vendor/libc++/dist/include/cctype vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/codecvt vendor/libc++/dist/include/complex vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdio vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/cstring vendor/libc++/dist/include/cwchar vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/ext/__hash vendor/libc++/dist/include/ext/hash_map vendor/libc++/dist/include/ext/hash_set 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/iosfwd 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/new vendor/libc++/dist/include/numeric vendor/libc++/dist/include/ostream vendor/libc++/dist/include/queue vendor/libc++/dist/include/random vendor/libc++/dist/include/ratio vendor/libc++/dist/include/regex vendor/libc++/dist/include/scoped_allocator vendor/libc++/dist/include/set vendor/libc++/dist/include/sstream vendor/libc++/dist/include/stack vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string 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/typeindex vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/unordered_set vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/src/algorithm.cpp vendor/libc++/dist/src/debug.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/ios.cpp vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/random.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/string.cpp vendor/libc++/dist/src/strstream.cpp vendor/libc++/dist/src/system_error.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/src/typeinfo.cpp vendor/libc++/dist/src/valarray.cpp Modified: vendor/libc++/dist/CREDITS.TXT ============================================================================== --- vendor/libc++/dist/CREDITS.TXT Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/CREDITS.TXT Wed Jan 29 19:30:27 2014 (r261272) @@ -31,6 +31,14 @@ D: FreeBSD and Solaris ports, libcxxrt s N: Marshall Clow E: mclow.lists@gmail.com E: marshall@idio.com +D: C++14 support, patches and bug fixes. + +N: Bill Fisher +E: william.w.fisher@gmail.com +D: Regex bug fixes. + +N: Matthew Dempsky +E: matthew@dempsky.org D: Minor patches and bug fixes. N: Google Inc. @@ -48,6 +56,10 @@ N: Argyrios Kyrtzidis E: kyrtzidis@apple.com D: Bug fixes. +N: Bruce Mitchener, Jr. +E: bruce.mitchener@gmail.com +D: Emscripten-related changes. + N: Michel Morin E: mimomorin@gmail.com D: Minor patches to is_convertible. @@ -64,6 +76,10 @@ N: Bjorn Reese E: breese@users.sourceforge.net D: Initial regex prototype +N: Nico Rieck +E: nico.rieck@gmail.com +D: Windows fixes + N: Jonathan Sauer D: Minor patches, mostly related to constexpr @@ -74,6 +90,14 @@ D: Implemented Cityhash as the string ha N: Richard Smith D: Minor patches. +N: Joerg Sonnenberger +E: joerg@NetBSD.org +D: NetBSD port. + +N: Stephan Tolksdorf +E: st@quanttec.com +D: Minor fix + N: Michael van der Westhuizen E: r1mikey at gmail dot com @@ -85,11 +109,15 @@ N: Zhang Xiongpang E: zhangxiongpang@gmail.com D: Minor patches and bug fixes. +N: Xing Xue +E: xingxue@ca.ibm.com +D: AIX port + +N: Zhihao Yuan +E: lichray@gmail.com +D: Standard compatibility fixes. + N: Jeffrey Yasskin E: jyasskin@gmail.com E: jyasskin@google.com D: Linux fixes. - -N: Bruce Mitchener, Jr. -E: bruce.mitchener@gmail.com -D: Emscripten-related changes. Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__bit_reference Wed Jan 29 19:30:27 2014 (r261272) @@ -40,7 +40,7 @@ class __bit_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; @@ -82,7 +82,7 @@ class __bit_reference<_Cp, false> }; template -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT { @@ -92,7 +92,7 @@ swap(__bit_reference<_Cp> __x, __bit_ref } template -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT { @@ -102,7 +102,7 @@ swap(__bit_reference<_Cp> __x, __bit_ref } template -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT { @@ -112,7 +112,7 @@ swap(__bit_reference<_Cp> __x, bool& __y } template -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT { @@ -130,7 +130,7 @@ class __bit_const_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; @@ -173,6 +173,8 @@ __find_bool_true(__bit_iterator<_Cp, _Is __storage_type __b = *__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); + if (__n == __dn) + return _It(__first.__seg_, __first.__ctz_ + __n); __n -= __dn; ++__first.__seg_; } @@ -207,6 +209,8 @@ __find_bool_false(__bit_iterator<_Cp, _I __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); + if (__n == __dn) + return _It(__first.__seg_, __first.__ctz_ + __n); __n -= __dn; ++__first.__seg_; } @@ -375,7 +379,7 @@ __fill_n_true(__bit_iterator<_Cp, false> } template -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) { @@ -1104,7 +1108,11 @@ private: unsigned __ctz_; public: - _LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT {} + _LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT +#if _LIBCPP_STD_VER > 11 + : __seg_(nullptr), __ctz_(0) +#endif + {} _LIBCPP_INLINE_VISIBILITY __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT @@ -1214,7 +1222,7 @@ private: __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT : __seg_(__s), __ctz_(__ctz) {} -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__config Wed Jan 29 19:30:27 2014 (r261272) @@ -11,7 +11,7 @@ #ifndef _LIBCPP_CONFIG #define _LIBCPP_CONFIG -#ifndef _MSC_VER // explicit macro necessary because it is only defined below in this file +#if !defined(_MSC_VER) || defined(__clang__) #pragma GCC system_header #endif @@ -72,15 +72,26 @@ # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 // Compiler intrinsics (GCC or MSVC) -# if (defined(_MSC_VER) && _MSC_VER >= 1400) \ +# if defined(__clang__) \ + || (defined(_MSC_VER) && _MSC_VER >= 1400) \ || (defined(__GNUC__) && _GNUC_VER > 403) -# define _LIBCP_HAS_IS_BASE_OF +# define _LIBCPP_HAS_IS_BASE_OF +# endif +# if defined(_MSC_VER) && !defined(__clang__) +# define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler +# define _LIBCPP_TOSTRING2(x) #x +# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x) +# define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x)) +# endif +# // If mingw not explicitly detected, assume using MS C runtime only. +# ifndef __MINGW32__ +# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library # endif #endif // _WIN32 #ifdef __linux__ # if defined(__GNUC__) && _GNUC_VER >= 403 -# define _LIBCP_HAS_IS_BASE_OF +# define _LIBCPP_HAS_IS_BASE_OF # endif #endif @@ -127,8 +138,11 @@ # define _LIBCPP_TYPE_VIS #endif +#define _LIBCPP_TYPE_VIS_ONLY +#define _LIBCPP_FUNC_VIS_ONLY + #ifndef _LIBCPP_INLINE_VISIBILITY -# ifdef _MSC_VER +# ifdef _LIBCPP_MSVC # define _LIBCPP_INLINE_VISIBILITY __forceinline # else // MinGW GCC and Clang # define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__)) @@ -140,7 +154,7 @@ #endif #ifndef _LIBCPP_ALWAYS_INLINE -# ifdef _MSC_VER +# ifdef _LIBCPP_MSVC # define _LIBCPP_ALWAYS_INLINE __forceinline # endif #endif @@ -160,13 +174,21 @@ #endif #ifndef _LIBCPP_TYPE_VIS -# if __has_attribute(type_visibility) +# if __has_attribute(__type_visibility__) # define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default"))) # else # define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default"))) # endif #endif +#ifndef _LIBCPP_TYPE_VIS_ONLY +# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS +#endif + +#ifndef _LIBCPP_FUNC_VIS_ONLY +# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS +#endif + #ifndef _LIBCPP_INLINE_VISIBILITY #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) #endif @@ -175,10 +197,6 @@ #define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS #endif -#ifndef _LIBCPP_CANTTHROW -#define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__)) -#endif - #ifndef _LIBCPP_ALWAYS_INLINE #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) #endif @@ -273,7 +291,7 @@ typedef __char32_t char32_t; #endif #if __has_feature(is_base_of) -# define _LIBCP_HAS_IS_BASE_OF +# define _LIBCPP_HAS_IS_BASE_OF #endif // Objective-C++ features (opt-in) @@ -396,13 +414,14 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } -#elif defined(_MSC_VER) +#elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER #define _LIBCPP_HAS_NO_CONSTEXPR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) #define _ALIGNAS(x) __declspec(align(x)) @@ -415,10 +434,43 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_END_NAMESPACE_STD } #define _VSTD std +# define _LIBCPP_WEAK +namespace std { +} + +#elif defined(__IBMCPP__) + +#define _ALIGNAS(x) __attribute__((__aligned__(x))) +#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) +#define _ATTRIBUTE(x) __attribute__((x)) +#define _LIBCPP_NORETURN __attribute__((noreturn)) + +#define _NOEXCEPT throw() +#define _NOEXCEPT_(x) + +#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#define _LIBCPP_HAS_NO_NULLPTR +#define _LIBCPP_HAS_NO_UNICODE_CHARS +#define _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_HAS_IS_BASE_OF + +#if defined(_AIX) +#define __MULTILOCALE_API +#endif + +#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { +#define _LIBCPP_END_NAMESPACE_STD } } +#define _VSTD std::_LIBCPP_NAMESPACE + namespace std { + inline namespace _LIBCPP_NAMESPACE { + } } -#endif // __clang__ || __GNUC___ || _MSC_VER +#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; @@ -481,8 +533,23 @@ template struct __static_asse #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) #endif // _LIBCPP_HAS_NO_STRONG_ENUMS +#ifdef _LIBCPP_DEBUG +# if _LIBCPP_DEBUG == 0 +# define _LIBCPP_DEBUG_LEVEL 1 +# elif _LIBCPP_DEBUG == 1 +# define _LIBCPP_DEBUG_LEVEL 2 +# else +# error Supported values for _LIBCPP_DEBUG are 0 and 1 +# endif +# define _LIBCPP_EXTERN_TEMPLATE(...) +#endif + #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; +#define _LIBCPP_EXTERN_TEMPLATE(...) +#endif + +#ifndef _LIBCPP_EXTERN_TEMPLATE2 +#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; #endif #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__) @@ -500,14 +567,14 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#ifdef _LIBCPP_DEBUG2 -# if _LIBCPP_DEBUG2 == 0 -# define _LIBCPP_DEBUG_LEVEL 1 -# elif _LIBCPP_DEBUG2 == 1 -# define _LIBCPP_DEBUG_LEVEL 2 -# else -# error Supported values for _LIBCPP_DEBUG2 are 0 and 1 -# endif +#if defined(__APPLE__) +#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 +#endif +#endif + +#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 #endif #ifndef _LIBCPP_STD_VER @@ -518,10 +585,36 @@ template struct __static_asse # endif #endif // _LIBCPP_STD_VER -#ifdef _LIBCPP_DEBUG2 -# include <__debug> +#if _LIBCPP_STD_VER > 11 +#define _LIBCPP_DEPRECATED [[deprecated]] #else -# define _LIBCPP_ASSERT(x, m) ((void)0) +#define _LIBCPP_DEPRECATED +#endif + +#if _LIBCPP_STD_VER <= 11 +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 +#define _LIBCPP_EXPLICIT_AFTER_CXX11 +#define _LIBCPP_DEPRECATED_AFTER_CXX11 +#else +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr +#define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit +#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] +#endif + +// Try to find out if RTTI is disabled. +// g++ and cl.exe have RTTI on by default and define a macro when it is. +// g++ only defines the macro in 4.3.2 and onwards. +#if !defined(_LIBCPP_NO_RTTI) +# if defined(__GNUG__) && (__GNUC__ >= 4 && \ + (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI) +# define _LIBCPP_NO_RTTI +# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) +# define _LIBCPP_NO_RTTI +# endif +#endif + +#ifndef _LIBCPP_WEAK +# define _LIBCPP_WEAK __attribute__((__weak__)) #endif #endif // _LIBCPP_CONFIG Modified: vendor/libc++/dist/include/__debug ============================================================================== --- vendor/libc++/dist/include/__debug Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__debug Wed Jan 29 19:30:27 2014 (r261272) @@ -11,6 +11,10 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + #if _LIBCPP_DEBUG_LEVEL >= 1 # include @@ -34,8 +38,15 @@ struct _LIBCPP_TYPE_VIS __i_node __i_node* __next_; __c_node* __c_; +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __i_node(const __i_node&) = delete; __i_node& operator=(const __i_node&) = delete; +#else +private: + __i_node(const __i_node&); + __i_node& operator=(const __i_node&); +public: +#endif _LIBCPP_INLINE_VISIBILITY __i_node(void* __i, __i_node* __next, __c_node* __c) : __i_(__i), __next_(__next), __c_(__c) {} @@ -50,8 +61,15 @@ struct _LIBCPP_TYPE_VIS __c_node __i_node** end_; __i_node** cap_; +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __c_node(const __c_node&) = delete; __c_node& operator=(const __c_node&) = delete; +#else +private: + __c_node(const __c_node&); + __c_node& operator=(const __c_node&); +public: +#endif _LIBCPP_INLINE_VISIBILITY __c_node(void* __c, __c_node* __next) : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {} @@ -130,8 +148,15 @@ class _LIBCPP_TYPE_VIS __libcpp_db __libcpp_db(); public: +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __libcpp_db(const __libcpp_db&) = delete; __libcpp_db& operator=(const __libcpp_db&) = delete; +#else +private: + __libcpp_db(const __libcpp_db&); + __libcpp_db& operator=(const __libcpp_db&); +public: +#endif ~__libcpp_db(); class __db_c_iterator; @@ -171,7 +196,7 @@ public: bool __decrementable(const void* __i) const; bool __addable(const void* __i, ptrdiff_t __n) const; bool __subscriptable(const void* __i, ptrdiff_t __n) const; - bool __comparable(const void* __i, const void* __j) const; + bool __less_than_comparable(const void* __i, const void* __j) const; private: _LIBCPP_HIDDEN __i_node* __insert_iterator(void* __i); Modified: vendor/libc++/dist/include/__functional_03 ============================================================================== --- vendor/libc++/dist/include/__functional_03 Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__functional_03 Wed Jan 29 19:30:27 2014 (r261272) @@ -102,98 +102,98 @@ mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2)) template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)()> +__mem_fn<_Rp (_Tp::*)() const> mem_fn(_Rp (_Tp::* __pm)() const) { - return __mem_fn<_Rp (_Tp::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)() const>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0)> +__mem_fn<_Rp (_Tp::*)(_A0) const> mem_fn(_Rp (_Tp::* __pm)(_A0) const) { - return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0) const>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1) const> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) const) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1) const>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) const> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) const) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) const>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)()> +__mem_fn<_Rp (_Tp::*)() volatile> mem_fn(_Rp (_Tp::* __pm)() volatile) { - return __mem_fn<_Rp (_Tp::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)() volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0)> +__mem_fn<_Rp (_Tp::*)(_A0) volatile> mem_fn(_Rp (_Tp::* __pm)(_A0) volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0) volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1) volatile> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1) volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) volatile> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)()> +__mem_fn<_Rp (_Tp::*)() const volatile> mem_fn(_Rp (_Tp::* __pm)() const volatile) { - return __mem_fn<_Rp (_Tp::*)()>(__pm); + return __mem_fn<_Rp (_Tp::*)() const volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0)> +__mem_fn<_Rp (_Tp::*)(_A0) const volatile> mem_fn(_Rp (_Tp::* __pm)(_A0) const volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0) const volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1) const volatile> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1) const volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1) const volatile>(__pm); } template inline _LIBCPP_INLINE_VISIBILITY -__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)> +__mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) const volatile> mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2) const volatile) { - return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2)>(__pm); + return __mem_fn<_Rp (_Tp::*)(_A0, _A1, _A2) const volatile>(__pm); } // bad_function_call @@ -203,7 +203,7 @@ class _LIBCPP_EXCEPTION_ABI bad_function { }; -template class _LIBCPP_TYPE_VIS function; // undefined +template class _LIBCPP_TYPE_VIS_ONLY function; // undefined namespace __function { @@ -644,7 +644,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>: } // __function template -class _LIBCPP_TYPE_VIS function<_Rp()> +class _LIBCPP_TYPE_VIS_ONLY function<_Rp()> { typedef __function::__base<_Rp()> __base; aligned_storage<3*sizeof(void*)>::type __buf_; @@ -928,7 +928,7 @@ function<_Rp()>::target() const #endif // _LIBCPP_NO_RTTI template -class _LIBCPP_TYPE_VIS function<_Rp(_A0)> +class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0)> : public unary_function<_A0, _Rp> { typedef __function::__base<_Rp(_A0)> __base; @@ -1230,7 +1230,7 @@ function<_Rp(_A0)>::target() const #endif // _LIBCPP_NO_RTTI template -class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1)> +class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1)> : public binary_function<_A0, _A1, _Rp> { typedef __function::__base<_Rp(_A0, _A1)> __base; @@ -1532,7 +1532,7 @@ function<_Rp(_A0, _A1)>::target() const #endif // _LIBCPP_NO_RTTI template -class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1, _A2)> +class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1, _A2)> { typedef __function::__base<_Rp(_A0, _A1, _A2)> __base; aligned_storage<3*sizeof(void*)>::type __buf_; @@ -1860,11 +1860,11 @@ swap(function<_Fp>& __x, function<_Fp>& {return __x.swap(__y);} template struct __is_bind_expression : public false_type {}; -template struct _LIBCPP_TYPE_VIS is_bind_expression +template struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression : public __is_bind_expression::type> {}; template struct __is_placeholder : public integral_constant {}; -template struct _LIBCPP_TYPE_VIS is_placeholder +template struct _LIBCPP_TYPE_VIS_ONLY is_placeholder : public __is_placeholder::type> {}; namespace placeholders Modified: vendor/libc++/dist/include/__functional_base ============================================================================== --- vendor/libc++/dist/include/__functional_base Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__functional_base Wed Jan 29 19:30:27 2014 (r261272) @@ -15,6 +15,7 @@ #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -23,21 +24,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TYPE_VIS unary_function +struct _LIBCPP_TYPE_VIS_ONLY unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template -struct _LIBCPP_TYPE_VIS binary_function +struct _LIBCPP_TYPE_VIS_ONLY binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; -template struct _LIBCPP_TYPE_VIS hash; +template struct _LIBCPP_TYPE_VIS_ONLY hash; template struct __has_result_type @@ -50,13 +51,80 @@ public: static const bool value = sizeof(__test<_Tp>(0)) == 1; }; +#if _LIBCPP_STD_VER > 11 +template +#else template -struct _LIBCPP_TYPE_VIS less : binary_function<_Tp, _Tp, bool> +#endif +struct _LIBCPP_TYPE_VIS_ONLY less : binary_function<_Tp, _Tp, bool> { - _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + bool operator()(const _Tp& __x, const _Tp& __y) const {return __x < __y;} }; +#if _LIBCPP_STD_VER > 11 +template <> +struct _LIBCPP_TYPE_VIS_ONLY less +{ + template + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + auto operator()(_T1&& __t, _T2&& __u) const + { return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); } + typedef void is_transparent; +}; +#endif + +// addressof + +template +inline _LIBCPP_INLINE_VISIBILITY +_Tp* +addressof(_Tp& __x) _NOEXCEPT +{ + return (_Tp*)&reinterpret_cast(__x); +} + +#if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF) +// Objective-C++ Automatic Reference Counting uses qualified pointers +// that require special addressof() signatures. When +// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler +// itself is providing these definitions. Otherwise, we provide them. +template +inline _LIBCPP_INLINE_VISIBILITY +__strong _Tp* +addressof(__strong _Tp& __x) _NOEXCEPT +{ + return &__x; +} + +#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK +template +inline _LIBCPP_INLINE_VISIBILITY +__weak _Tp* +addressof(__weak _Tp& __x) _NOEXCEPT +{ + return &__x; +} +#endif + +template +inline _LIBCPP_INLINE_VISIBILITY +__autoreleasing _Tp* +addressof(__autoreleasing _Tp& __x) _NOEXCEPT +{ + return &__x; +} + +template +inline _LIBCPP_INLINE_VISIBILITY +__unsafe_unretained _Tp* +addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT +{ + return &__x; +} +#endif + #ifdef _LIBCPP_HAS_NO_VARIADICS #include <__functional_base_03> @@ -352,7 +420,7 @@ struct __invoke_return }; template -class _LIBCPP_TYPE_VIS reference_wrapper +class _LIBCPP_TYPE_VIS_ONLY reference_wrapper : public __weak_result_type<_Tp> { public: @@ -363,7 +431,8 @@ private: public: // construct/copy/destroy - _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT : __f_(&__f) {} + _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT + : __f_(_VSTD::addressof(__f)) {} #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES private: reference_wrapper(type&&); public: // = delete; // do not bind to temps #endif @@ -436,6 +505,111 @@ template void cref(const _Tp #endif // _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 11 +template +struct __is_transparent +{ +private: + struct __two {char __lx; char __lxx;}; + template static __two __test(...); + template static char __test(typename _Up::is_transparent* = 0); +public: + static const bool value = sizeof(__test<_Tp1>(0)) == 1; +}; +#endif + +// allocator_arg_t + +struct _LIBCPP_TYPE_VIS_ONLY allocator_arg_t { }; + +#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MEMORY) +extern const allocator_arg_t allocator_arg; +#else +constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +#endif + +// uses_allocator + +template +struct __has_allocator_type +{ +private: + struct __two {char __lx; char __lxx;}; + template static __two __test(...); + template static char __test(typename _Up::allocator_type* = 0); +public: + static const bool value = sizeof(__test<_Tp>(0)) == 1; +}; + +template ::value> +struct __uses_allocator + : public integral_constant::value> +{ +}; + +template +struct __uses_allocator<_Tp, _Alloc, false> + : public false_type +{ +}; + +template +struct _LIBCPP_TYPE_VIS_ONLY uses_allocator + : public __uses_allocator<_Tp, _Alloc> +{ +}; + +#ifndef _LIBCPP_HAS_NO_VARIADICS + +// allocator construction + +template +struct __uses_alloc_ctor_imp +{ + static const bool __ua = uses_allocator<_Tp, _Alloc>::value; + static const bool __ic = + is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; + static const int value = __ua ? 2 - __ic : 0; +}; + +template +struct __uses_alloc_ctor + : integral_constant::value> + {}; + +template +inline _LIBCPP_INLINE_VISIBILITY +void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &, _Args &&... __args ) +{ + new (__storage) _Tp (_VSTD::forward<_Args>(__args)...); +} + +template +inline _LIBCPP_INLINE_VISIBILITY +void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) +{ + new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...); +} + +template +inline _LIBCPP_INLINE_VISIBILITY +void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) +{ + new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a); +} + +template +inline _LIBCPP_INLINE_VISIBILITY +void __user_alloc_construct (_Tp *__storage, const _Allocator &__a, _Args &&... __args) +{ + __user_alloc_construct_impl( + __uses_alloc_ctor<_Tp, _Allocator>(), + __storage, __a, _VSTD::forward<_Args>(__args)... + ); +} +#endif // _LIBCPP_HAS_NO_VARIADICS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_FUNCTIONAL_BASE Modified: vendor/libc++/dist/include/__functional_base_03 ============================================================================== --- vendor/libc++/dist/include/__functional_base_03 Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__functional_base_03 Wed Jan 29 19:30:27 2014 (r261272) @@ -996,7 +996,7 @@ struct __invoke_return2 }; template -class _LIBCPP_TYPE_VIS reference_wrapper +class _LIBCPP_TYPE_VIS_ONLY reference_wrapper : public __weak_result_type<_Tp> { public: Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Wed Jan 29 19:28:52 2014 (r261271) +++ vendor/libc++/dist/include/__hash_table Wed Jan 29 19:30:27 2014 (r261272) @@ -20,6 +20,12 @@ #include <__undef_min_max> +#ifdef _LIBCPP_DEBUG +# include <__debug> +#else +# define _LIBCPP_ASSERT(x, m) ((void)0) +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif @@ -79,14 +85,14 @@ __next_pow2(size_t __n) } template class __hash_table; -template class _LIBCPP_TYPE_VIS __hash_const_iterator; -template class _LIBCPP_TYPE_VIS __hash_map_iterator; -template class _LIBCPP_TYPE_VIS __hash_map_const_iterator; +template class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator; +template class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator; +template class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator; template - class _LIBCPP_TYPE_VIS unordered_map; + class _LIBCPP_TYPE_VIS_ONLY unordered_map; template -class _LIBCPP_TYPE_VIS __hash_iterator +class _LIBCPP_TYPE_VIS_ONLY __hash_iterator { typedef _NodePtr __node_pointer; @@ -105,16 +111,70 @@ public: #endif pointer; - _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT {} + _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT +#if _LIBCPP_STD_VER > 11 + : __node_(nullptr) +#endif + { +#if _LIBCPP_DEBUG_LEVEL >= 2 + __get_db()->__insert_i(this); +#endif + } + +#if _LIBCPP_DEBUG_LEVEL >= 2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***