Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2014 19:30:37 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r262801 - in stable: 10/contrib/libc++ 10/contrib/libc++/include 10/contrib/libc++/include/experimental 10/contrib/libc++/include/ext 10/contrib/libc++/src 10/etc/mtree 10/lib/libc++ 10...
Message-ID:  <201403051930.s25JUbxp062356@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Mar  5 19:30:36 2014
New Revision: 262801
URL: http://svnweb.freebsd.org/changeset/base/262801

Log:
  MFC r261283:
  
  Import libc++ 3.4 release.  This contains a lot of bugfixes, and some
  preliminary support for C++1y.
  
  MFC r261604:
  
  HEAD is not buildable for the past day.  Commit a 'quick fix' in order to permit
  buildworld to complete.
  
  Reviewed by:	theraven
  
  MFC r261608:
  
  Apply a cleaner solution for the sign warnings that can occur when
  compiling libc++'s <locale> header with -Wsystem-headers on.
  
  This has also been submitted upstream.
  
  Reported by:	asomers
  
  MFC r261801:
  
  An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
  was caused by upstream libc++ commit r194536, which aimed to make the
  headers more standards-compliant, by making std::pair's copy constructor
  trivial.  Unfortunately, this could cause certain C++ applications using
  shared libraries built against the previous version of libc++ to crash.
  
  Fix the ABI incompatibility by making std::pair's copy constructor
  non-trivial again.
  
  Please note: Any C++ applications or shared libraries built with libc++
  between r261283 and this revision should be recompiled.
  
  Reported by:	stefanf

Added:
  stable/9/contrib/libc++/include/experimental/
     - copied from r261283, head/contrib/libc++/include/experimental/
  stable/9/contrib/libc++/include/shared_mutex
     - copied unchanged from r261283, head/contrib/libc++/include/shared_mutex
  stable/9/contrib/libc++/src/optional.cpp
     - copied unchanged from r261283, head/contrib/libc++/src/optional.cpp
  stable/9/contrib/libc++/src/shared_mutex.cpp
     - copied unchanged from r261283, head/contrib/libc++/src/shared_mutex.cpp
Modified:
  stable/9/contrib/libc++/CREDITS.TXT
  stable/9/contrib/libc++/include/__bit_reference
  stable/9/contrib/libc++/include/__config
  stable/9/contrib/libc++/include/__debug
  stable/9/contrib/libc++/include/__functional_03
  stable/9/contrib/libc++/include/__functional_base
  stable/9/contrib/libc++/include/__functional_base_03
  stable/9/contrib/libc++/include/__hash_table
  stable/9/contrib/libc++/include/__locale
  stable/9/contrib/libc++/include/__mutex_base
  stable/9/contrib/libc++/include/__split_buffer
  stable/9/contrib/libc++/include/__std_stream
  stable/9/contrib/libc++/include/__tree
  stable/9/contrib/libc++/include/__tuple
  stable/9/contrib/libc++/include/__tuple_03
  stable/9/contrib/libc++/include/__undef_min_max
  stable/9/contrib/libc++/include/algorithm
  stable/9/contrib/libc++/include/array
  stable/9/contrib/libc++/include/bitset
  stable/9/contrib/libc++/include/cctype
  stable/9/contrib/libc++/include/chrono
  stable/9/contrib/libc++/include/cmath
  stable/9/contrib/libc++/include/codecvt
  stable/9/contrib/libc++/include/complex
  stable/9/contrib/libc++/include/cstddef
  stable/9/contrib/libc++/include/cstdio
  stable/9/contrib/libc++/include/cstdlib
  stable/9/contrib/libc++/include/cstring
  stable/9/contrib/libc++/include/cwchar
  stable/9/contrib/libc++/include/deque
  stable/9/contrib/libc++/include/exception
  stable/9/contrib/libc++/include/ext/__hash
  stable/9/contrib/libc++/include/ext/hash_map
  stable/9/contrib/libc++/include/ext/hash_set
  stable/9/contrib/libc++/include/forward_list
  stable/9/contrib/libc++/include/fstream
  stable/9/contrib/libc++/include/functional
  stable/9/contrib/libc++/include/future
  stable/9/contrib/libc++/include/initializer_list
  stable/9/contrib/libc++/include/iomanip
  stable/9/contrib/libc++/include/ios
  stable/9/contrib/libc++/include/iosfwd
  stable/9/contrib/libc++/include/istream
  stable/9/contrib/libc++/include/iterator
  stable/9/contrib/libc++/include/limits
  stable/9/contrib/libc++/include/list
  stable/9/contrib/libc++/include/locale
  stable/9/contrib/libc++/include/map
  stable/9/contrib/libc++/include/memory
  stable/9/contrib/libc++/include/mutex
  stable/9/contrib/libc++/include/new
  stable/9/contrib/libc++/include/numeric
  stable/9/contrib/libc++/include/ostream
  stable/9/contrib/libc++/include/queue
  stable/9/contrib/libc++/include/random
  stable/9/contrib/libc++/include/ratio
  stable/9/contrib/libc++/include/regex
  stable/9/contrib/libc++/include/scoped_allocator
  stable/9/contrib/libc++/include/set
  stable/9/contrib/libc++/include/sstream
  stable/9/contrib/libc++/include/stack
  stable/9/contrib/libc++/include/streambuf
  stable/9/contrib/libc++/include/string
  stable/9/contrib/libc++/include/system_error
  stable/9/contrib/libc++/include/thread
  stable/9/contrib/libc++/include/tuple
  stable/9/contrib/libc++/include/type_traits
  stable/9/contrib/libc++/include/typeindex
  stable/9/contrib/libc++/include/unordered_map
  stable/9/contrib/libc++/include/unordered_set
  stable/9/contrib/libc++/include/utility
  stable/9/contrib/libc++/include/valarray
  stable/9/contrib/libc++/include/vector
  stable/9/contrib/libc++/src/algorithm.cpp
  stable/9/contrib/libc++/src/debug.cpp
  stable/9/contrib/libc++/src/exception.cpp
  stable/9/contrib/libc++/src/future.cpp
  stable/9/contrib/libc++/src/ios.cpp
  stable/9/contrib/libc++/src/iostream.cpp
  stable/9/contrib/libc++/src/locale.cpp
  stable/9/contrib/libc++/src/mutex.cpp
  stable/9/contrib/libc++/src/new.cpp
  stable/9/contrib/libc++/src/random.cpp
  stable/9/contrib/libc++/src/stdexcept.cpp
  stable/9/contrib/libc++/src/string.cpp
  stable/9/contrib/libc++/src/strstream.cpp
  stable/9/contrib/libc++/src/system_error.cpp
  stable/9/contrib/libc++/src/thread.cpp
  stable/9/contrib/libc++/src/typeinfo.cpp
  stable/9/contrib/libc++/src/valarray.cpp
  stable/9/etc/mtree/BSD.include.dist
  stable/9/lib/libc++/Makefile
  stable/9/sys/sys/param.h
  stable/9/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/libc++/   (props changed)
  stable/9/etc/   (props changed)
  stable/9/etc/mtree/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc++/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/build/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/10/contrib/libc++/include/experimental/
     - copied from r261283, head/contrib/libc++/include/experimental/
  stable/10/contrib/libc++/include/shared_mutex
     - copied unchanged from r261283, head/contrib/libc++/include/shared_mutex
  stable/10/contrib/libc++/src/optional.cpp
     - copied unchanged from r261283, head/contrib/libc++/src/optional.cpp
  stable/10/contrib/libc++/src/shared_mutex.cpp
     - copied unchanged from r261283, head/contrib/libc++/src/shared_mutex.cpp
Modified:
  stable/10/contrib/libc++/CREDITS.TXT
  stable/10/contrib/libc++/include/__bit_reference
  stable/10/contrib/libc++/include/__config
  stable/10/contrib/libc++/include/__debug
  stable/10/contrib/libc++/include/__functional_03
  stable/10/contrib/libc++/include/__functional_base
  stable/10/contrib/libc++/include/__functional_base_03
  stable/10/contrib/libc++/include/__hash_table
  stable/10/contrib/libc++/include/__locale
  stable/10/contrib/libc++/include/__mutex_base
  stable/10/contrib/libc++/include/__split_buffer
  stable/10/contrib/libc++/include/__std_stream
  stable/10/contrib/libc++/include/__tree
  stable/10/contrib/libc++/include/__tuple
  stable/10/contrib/libc++/include/__tuple_03
  stable/10/contrib/libc++/include/__undef_min_max
  stable/10/contrib/libc++/include/algorithm
  stable/10/contrib/libc++/include/array
  stable/10/contrib/libc++/include/bitset
  stable/10/contrib/libc++/include/cctype
  stable/10/contrib/libc++/include/chrono
  stable/10/contrib/libc++/include/cmath
  stable/10/contrib/libc++/include/codecvt
  stable/10/contrib/libc++/include/complex
  stable/10/contrib/libc++/include/cstddef
  stable/10/contrib/libc++/include/cstdio
  stable/10/contrib/libc++/include/cstdlib
  stable/10/contrib/libc++/include/cstring
  stable/10/contrib/libc++/include/cwchar
  stable/10/contrib/libc++/include/deque
  stable/10/contrib/libc++/include/exception
  stable/10/contrib/libc++/include/ext/__hash
  stable/10/contrib/libc++/include/ext/hash_map
  stable/10/contrib/libc++/include/ext/hash_set
  stable/10/contrib/libc++/include/forward_list
  stable/10/contrib/libc++/include/fstream
  stable/10/contrib/libc++/include/functional
  stable/10/contrib/libc++/include/future
  stable/10/contrib/libc++/include/initializer_list
  stable/10/contrib/libc++/include/iomanip
  stable/10/contrib/libc++/include/ios
  stable/10/contrib/libc++/include/iosfwd
  stable/10/contrib/libc++/include/istream
  stable/10/contrib/libc++/include/iterator
  stable/10/contrib/libc++/include/limits
  stable/10/contrib/libc++/include/list
  stable/10/contrib/libc++/include/locale
  stable/10/contrib/libc++/include/map
  stable/10/contrib/libc++/include/memory
  stable/10/contrib/libc++/include/mutex
  stable/10/contrib/libc++/include/new
  stable/10/contrib/libc++/include/numeric
  stable/10/contrib/libc++/include/ostream
  stable/10/contrib/libc++/include/queue
  stable/10/contrib/libc++/include/random
  stable/10/contrib/libc++/include/ratio
  stable/10/contrib/libc++/include/regex
  stable/10/contrib/libc++/include/scoped_allocator
  stable/10/contrib/libc++/include/set
  stable/10/contrib/libc++/include/sstream
  stable/10/contrib/libc++/include/stack
  stable/10/contrib/libc++/include/streambuf
  stable/10/contrib/libc++/include/string
  stable/10/contrib/libc++/include/system_error
  stable/10/contrib/libc++/include/thread
  stable/10/contrib/libc++/include/tuple
  stable/10/contrib/libc++/include/type_traits
  stable/10/contrib/libc++/include/typeindex
  stable/10/contrib/libc++/include/unordered_map
  stable/10/contrib/libc++/include/unordered_set
  stable/10/contrib/libc++/include/utility
  stable/10/contrib/libc++/include/valarray
  stable/10/contrib/libc++/include/vector
  stable/10/contrib/libc++/src/algorithm.cpp
  stable/10/contrib/libc++/src/debug.cpp
  stable/10/contrib/libc++/src/exception.cpp
  stable/10/contrib/libc++/src/future.cpp
  stable/10/contrib/libc++/src/ios.cpp
  stable/10/contrib/libc++/src/iostream.cpp
  stable/10/contrib/libc++/src/locale.cpp
  stable/10/contrib/libc++/src/mutex.cpp
  stable/10/contrib/libc++/src/new.cpp
  stable/10/contrib/libc++/src/random.cpp
  stable/10/contrib/libc++/src/stdexcept.cpp
  stable/10/contrib/libc++/src/string.cpp
  stable/10/contrib/libc++/src/strstream.cpp
  stable/10/contrib/libc++/src/system_error.cpp
  stable/10/contrib/libc++/src/thread.cpp
  stable/10/contrib/libc++/src/typeinfo.cpp
  stable/10/contrib/libc++/src/valarray.cpp
  stable/10/etc/mtree/BSD.include.dist
  stable/10/lib/libc++/Makefile
  stable/10/sys/sys/param.h
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/contrib/libc++/CREDITS.TXT
==============================================================================
--- stable/9/contrib/libc++/CREDITS.TXT	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/CREDITS.TXT	Wed Mar  5 19:30:36 2014	(r262801)
@@ -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 <atomic> 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: stable/9/contrib/libc++/include/__bit_reference
==============================================================================
--- stable/9/contrib/libc++/include/__bit_reference	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__bit_reference	Wed Mar  5 19:30:36 2014	(r262801)
@@ -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 <class _Cp>
-_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 <class _Cp, class _Dp>
-_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 <class _Cp>
-_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 <class _Cp>
-_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<unsigned>(_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<unsigned>(_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 <class _Cp>
-_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: stable/9/contrib/libc++/include/__config
==============================================================================
--- stable/9/contrib/libc++/include/__config	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__config	Wed Mar  5 19:30:36 2014	(r262801)
@@ -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 {
 }
 
-#endif // __clang__ || __GNUC___ || _MSC_VER
+#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 || __IBMCPP__
 
 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
 typedef unsigned short char16_t;
@@ -481,8 +533,23 @@ template <unsigned> 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 <unsigned> 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__) || defined(__FreeBSD__)
+#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 <unsigned> 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: stable/9/contrib/libc++/include/__debug
==============================================================================
--- stable/9/contrib/libc++/include/__debug	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__debug	Wed Mar  5 19:30:36 2014	(r262801)
@@ -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 <cstdlib>
@@ -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: stable/9/contrib/libc++/include/__functional_03
==============================================================================
--- stable/9/contrib/libc++/include/__functional_03	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__functional_03	Wed Mar  5 19:30:36 2014	(r262801)
@@ -102,98 +102,98 @@ mem_fn(_Rp (_Tp::* __pm)(_A0, _A1, _A2))
 
 template<class _Rp, class _Tp>
 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<class _Rp, class _Tp, class _A0>
 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<class _Rp, class _Tp, class _A0, class _A1>
 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<class _Rp, class _Tp, class _A0, class _A1, class _A2>
 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<class _Rp, class _Tp>
 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<class _Rp, class _Tp, class _A0>
 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<class _Rp, class _Tp, class _A0, class _A1>
 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<class _Rp, class _Tp, class _A0, class _A1, class _A2>
 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<class _Rp, class _Tp>
 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<class _Rp, class _Tp, class _A0>
 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<class _Rp, class _Tp, class _A0, class _A1>
 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<class _Rp, class _Tp, class _A0, class _A1, class _A2>
 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 _Fp> class _LIBCPP_TYPE_VIS function; // undefined
+template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
 
 namespace __function
 {
@@ -644,7 +644,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>:
 }  // __function
 
 template<class _Rp>
-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 _Rp, class _A0>
-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 _Rp, class _A0, class _A1>
-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 _Rp, class _A0, class _A1, class _A2>
-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<class _Tp> struct __is_bind_expression : public false_type {};
-template<class _Tp> struct _LIBCPP_TYPE_VIS is_bind_expression
+template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
     : public __is_bind_expression<typename remove_cv<_Tp>::type> {};
 
 template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
-template<class _Tp> struct _LIBCPP_TYPE_VIS is_placeholder
+template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
     : public __is_placeholder<typename remove_cv<_Tp>::type> {};
 
 namespace placeholders

Modified: stable/9/contrib/libc++/include/__functional_base
==============================================================================
--- stable/9/contrib/libc++/include/__functional_base	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__functional_base	Wed Mar  5 19:30:36 2014	(r262801)
@@ -15,6 +15,7 @@
 #include <type_traits>
 #include <typeinfo>
 #include <exception>
+#include <new>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -23,21 +24,21 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Arg, class _Result>
-struct _LIBCPP_TYPE_VIS unary_function
+struct _LIBCPP_TYPE_VIS_ONLY unary_function
 {
     typedef _Arg    argument_type;
     typedef _Result result_type;
 };
 
 template <class _Arg1, class _Arg2, class _Result>
-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 <class _Tp> struct _LIBCPP_TYPE_VIS hash;
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash;
 
 template <class _Tp>
 struct __has_result_type
@@ -50,13 +51,80 @@ public:
     static const bool value = sizeof(__test<_Tp>(0)) == 1;
 };
 
+#if _LIBCPP_STD_VER > 11
+template <class _Tp = void>
+#else
 template <class _Tp>
-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<void>
+{
+    template <class _T1, class _T2> 
+    _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 <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp*
+addressof(_Tp& __x) _NOEXCEPT
+{
+    return (_Tp*)&reinterpret_cast<const volatile char&>(__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 <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+__strong _Tp*
+addressof(__strong _Tp& __x) _NOEXCEPT
+{
+  return &__x;
+}
+
+#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+__weak _Tp*
+addressof(__weak _Tp& __x) _NOEXCEPT
+{
+  return &__x;
+}
+#endif
+
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+__autoreleasing _Tp*
+addressof(__autoreleasing _Tp& __x) _NOEXCEPT
+{
+  return &__x;
+}
+
+template <class _Tp>
+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 _Tp>
-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 <class _Tp> void cref(const _Tp
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
+#if _LIBCPP_STD_VER > 11
+template <class _Tp1, class _Tp2 = void>
+struct __is_transparent
+{
+private:
+    struct __two {char __lx; char __lxx;};
+    template <class _Up> static __two __test(...);
+    template <class _Up> 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 <class _Tp>
+struct __has_allocator_type
+{
+private:
+    struct __two {char __lx; char __lxx;};
+    template <class _Up> static __two __test(...);
+    template <class _Up> static char __test(typename _Up::allocator_type* = 0);
+public:
+    static const bool value = sizeof(__test<_Tp>(0)) == 1;
+};
+
+template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value>
+struct __uses_allocator
+    : public integral_constant<bool,
+        is_convertible<_Alloc, typename _Tp::allocator_type>::value>
+{
+};
+
+template <class _Tp, class _Alloc>
+struct __uses_allocator<_Tp, _Alloc, false>
+    : public false_type
+{
+};
+
+template <class _Tp, class _Alloc>
+struct _LIBCPP_TYPE_VIS_ONLY uses_allocator
+    : public __uses_allocator<_Tp, _Alloc>
+{
+};
+
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
+// allocator construction
+
+template <class _Tp, class _Alloc, class ..._Args>
+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 <class _Tp, class _Alloc, class ..._Args>
+struct __uses_alloc_ctor
+    : integral_constant<int, __uses_alloc_ctor_imp<_Tp, _Alloc, _Args...>::value>
+    {};
+
+template <class _Tp, class _Allocator, class... _Args>
+inline _LIBCPP_INLINE_VISIBILITY
+void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
+{
+    new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
+}
+
+template <class _Tp, class _Allocator, class... _Args>
+inline _LIBCPP_INLINE_VISIBILITY
+void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
+{
+    new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
+}
+
+template <class _Tp, class _Allocator, class... _Args>
+inline _LIBCPP_INLINE_VISIBILITY
+void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
+{
+    new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
+}
+
+template <class _Tp, class _Allocator, class... _Args>
+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: stable/9/contrib/libc++/include/__functional_base_03
==============================================================================
--- stable/9/contrib/libc++/include/__functional_base_03	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__functional_base_03	Wed Mar  5 19:30:36 2014	(r262801)
@@ -996,7 +996,7 @@ struct __invoke_return2
 };
 
 template <class _Tp>
-class _LIBCPP_TYPE_VIS reference_wrapper
+class _LIBCPP_TYPE_VIS_ONLY reference_wrapper
     : public __weak_result_type<_Tp>
 {
 public:

Modified: stable/9/contrib/libc++/include/__hash_table
==============================================================================
--- stable/9/contrib/libc++/include/__hash_table	Wed Mar  5 19:28:50 2014	(r262800)
+++ stable/9/contrib/libc++/include/__hash_table	Wed Mar  5 19:30:36 2014	(r262801)
@@ -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 _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
-template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_iterator;
-template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_iterator;
-template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    class _LIBCPP_TYPE_VIS unordered_map;
+    class _LIBCPP_TYPE_VIS_ONLY unordered_map;
 
 template <class _NodePtr>
-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 ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403051930.s25JUbxp062356>