svn commit: r277217 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src lib/libc++
Dimitry Andric
dim at FreeBSD.org
Thu Jan 15 21:17:41 UTC 2015
Author: dim
Date: Thu Jan 15 21:17:36 2015
New Revision: 277217
URL: https://svnweb.freebsd.org/changeset/base/277217
Log:
Import libc++ trunk r224926. This fixes a number of bugs, completes
C++14 support[1], adds more C++1z features[2], and fixes the following
LWG issues[3]:
1450: Contradiction in regex_constants
2003: String exception inconsistency in erase.
2075: Progress guarantees, lock-free property, and scheduling
assumptions
2104: unique_lock move-assignment should not be noexcept
2112: User-defined classes that cannot be derived from
2132: std::function ambiguity
2135: Unclear requirement for exceptions thrown in
condition_variable::wait()
2142: packaged_task::operator() synchronization too broad?
2182: Container::[const_]reference types are misleadingly specified
2186: Incomplete action on async/launch::deferred
2188: Reverse iterator does not fully support targets that overload
operator&
2193: Default constructors for standard library containers are explicit
2205: Problematic postconditions of regex_match and regex_search
2213: Return value of std::regex_replace
2240: Probable misuse of term "function scope" in [thread.condition]
2252: Strong guarantee on vector::push_back() still broken with C++11?
2257: Simplify container requirements with the new algorithms
2258: a.erase(q1, q2) unable to directly return q2
2263: Comparing iterators and allocator pointers with different
const-character
2268: Setting a default argument in the declaration of a member
function assign of std::basic_string
2271: regex_traits::lookup_classname specification unclear
2272: quoted should use char_traits::eq for character comparison
2278: User-defined literals for Standard Library types
2280: begin / end for arrays should be constexpr and noexcept
2285: make_reverse_iterator
2288: Inconsistent requirements for shared mutexes
2291: std::hash is vulnerable to collision DoS attack
2293: Wrong facet used by num_put::do_put
2299: Effects of inaccessible key_compare::is_transparent type are not
clear
2301: Why is std::tie not constexpr?
2304: Complexity of count in unordered associative containers
2306: match_results::reference should be value_type&, not const
value_type&
2308: Clarify container destructor requirements w.r.t. std::array
2313: tuple_size should always derive from integral_constant<size_t, N>
2314: apply() should return decltype(auto) and use decay_t before
tuple_size
2315: weak_ptr should be movable
2316: weak_ptr::lock() should be atomic
2317: The type property queries should be UnaryTypeTraits returning
size_t
2320: select_on_container_copy_construction() takes allocators, not
containers
2322: Associative(initializer_list, stuff) constructors are
underspecified
2323: vector::resize(n, t)'s specification should be simplified
2324: Insert iterator constructors should use addressof()
2329: regex_match()/regex_search() with match_results should forbid
temporary strings
2330: regex("meow", regex::icase) is technically forbidden but should
be permitted
2332: regex_iterator/regex_token_iterator should forbid temporary
regexes
2339: Wording issue in nth_element
2341: Inconsistency between basic_ostream::seekp(pos) and
basic_ostream::seekp(off, dir)
2344: quoted()'s interaction with padding is unclear
2346: integral_constant's member functions should be marked noexcept
2350: min, max, and minmax should be constexpr
2356: Stability of erasure in unordered associative containers
2357: Remaining "Assignable" requirement
2359: How does regex_constants::nosubs affect basic_regex::mark_count()?
2360: reverse_iterator::operator*() is unimplementable
[1] http://libcxx.llvm.org/cxx1y_status.html
[2] http://libcxx.llvm.org/cxx1z_status.html
[3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html
Exp-run: antoine
MFC after: 1 month
Added:
head/contrib/libc++/include/__refstring
- copied unchanged from r276792, vendor/libc++/dist/include/__refstring
head/contrib/libc++/include/experimental/__config
- copied unchanged from r276792, vendor/libc++/dist/include/experimental/__config
head/contrib/libc++/include/experimental/string_view
- copied unchanged from r276792, vendor/libc++/dist/include/experimental/string_view
head/contrib/libc++/include/experimental/type_traits
- copied unchanged from r276792, vendor/libc++/dist/include/experimental/type_traits
head/contrib/libc++/include/experimental/utility
- copied unchanged from r276792, vendor/libc++/dist/include/experimental/utility
head/contrib/libc++/include/module.modulemap
- copied unchanged from r276792, vendor/libc++/dist/include/module.modulemap
Modified:
head/contrib/libc++/CREDITS.TXT
head/contrib/libc++/LICENSE.TXT
head/contrib/libc++/include/__bit_reference
head/contrib/libc++/include/__config
head/contrib/libc++/include/__debug
head/contrib/libc++/include/__functional_03
head/contrib/libc++/include/__functional_base
head/contrib/libc++/include/__functional_base_03
head/contrib/libc++/include/__hash_table
head/contrib/libc++/include/__locale
head/contrib/libc++/include/__mutex_base
head/contrib/libc++/include/__sso_allocator
head/contrib/libc++/include/__tree
head/contrib/libc++/include/__tuple
head/contrib/libc++/include/algorithm
head/contrib/libc++/include/atomic
head/contrib/libc++/include/bitset
head/contrib/libc++/include/chrono
head/contrib/libc++/include/cmath
head/contrib/libc++/include/condition_variable
head/contrib/libc++/include/cstddef
head/contrib/libc++/include/deque
head/contrib/libc++/include/experimental/dynarray
head/contrib/libc++/include/experimental/optional
head/contrib/libc++/include/ext/__hash
head/contrib/libc++/include/ext/hash_map
head/contrib/libc++/include/forward_list
head/contrib/libc++/include/functional
head/contrib/libc++/include/future
head/contrib/libc++/include/iomanip
head/contrib/libc++/include/ios
head/contrib/libc++/include/istream
head/contrib/libc++/include/iterator
head/contrib/libc++/include/limits
head/contrib/libc++/include/list
head/contrib/libc++/include/locale
head/contrib/libc++/include/map
head/contrib/libc++/include/memory
head/contrib/libc++/include/mutex
head/contrib/libc++/include/new
head/contrib/libc++/include/numeric
head/contrib/libc++/include/ostream
head/contrib/libc++/include/random
head/contrib/libc++/include/regex
head/contrib/libc++/include/set
head/contrib/libc++/include/shared_mutex
head/contrib/libc++/include/sstream
head/contrib/libc++/include/stdexcept
head/contrib/libc++/include/string
head/contrib/libc++/include/thread
head/contrib/libc++/include/tuple
head/contrib/libc++/include/type_traits
head/contrib/libc++/include/typeinfo
head/contrib/libc++/include/unordered_map
head/contrib/libc++/include/unordered_set
head/contrib/libc++/include/utility
head/contrib/libc++/include/valarray
head/contrib/libc++/include/vector
head/contrib/libc++/src/algorithm.cpp
head/contrib/libc++/src/chrono.cpp
head/contrib/libc++/src/condition_variable.cpp
head/contrib/libc++/src/debug.cpp
head/contrib/libc++/src/exception.cpp
head/contrib/libc++/src/future.cpp
head/contrib/libc++/src/hash.cpp
head/contrib/libc++/src/ios.cpp
head/contrib/libc++/src/locale.cpp
head/contrib/libc++/src/memory.cpp
head/contrib/libc++/src/mutex.cpp
head/contrib/libc++/src/new.cpp
head/contrib/libc++/src/optional.cpp
head/contrib/libc++/src/random.cpp
head/contrib/libc++/src/regex.cpp
head/contrib/libc++/src/shared_mutex.cpp
head/contrib/libc++/src/stdexcept.cpp
head/contrib/libc++/src/string.cpp
head/contrib/libc++/src/strstream.cpp
head/contrib/libc++/src/system_error.cpp
head/contrib/libc++/src/thread.cpp
head/contrib/libc++/src/valarray.cpp
head/lib/libc++/Makefile
Directory Properties:
head/contrib/libc++/ (props changed)
Modified: head/contrib/libc++/CREDITS.TXT
==============================================================================
--- head/contrib/libc++/CREDITS.TXT Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/CREDITS.TXT Thu Jan 15 21:17:36 2015 (r277217)
@@ -33,6 +33,10 @@ E: mclow.lists at gmail.com
E: marshall at idio.com
D: C++14 support, patches and bug fixes.
+N: Eric Fiselier
+E: eric at efcs.ca
+D: LFTS support, patches and bug fixes.
+
N: Bill Fisher
E: william.w.fisher at gmail.com
D: Regex bug fixes.
Modified: head/contrib/libc++/LICENSE.TXT
==============================================================================
--- head/contrib/libc++/LICENSE.TXT Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/LICENSE.TXT Thu Jan 15 21:17:36 2015 (r277217)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is in
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
All rights reserved.
@@ -55,7 +55,7 @@ SOFTWARE.
==============================================================================
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Modified: head/contrib/libc++/include/__bit_reference
==============================================================================
--- head/contrib/libc++/include/__bit_reference Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__bit_reference Thu Jan 15 21:17:36 2015 (r277217)
@@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is
if (__b)
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
if (__n == __dn)
- return _It(__first.__seg_, __first.__ctz_ + __n);
+ return __first + __n;
__n -= __dn;
++__first.__seg_;
}
@@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I
if (__b)
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
if (__n == __dn)
- return _It(__first.__seg_, __first.__ctz_ + __n);
+ return __first + __n;
__n -= __dn;
++__first.__seg_;
}
@@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY
__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);
+ return _VSTD::copy_backward(__first, __last, __result);
}
// swap_ranges
Modified: head/contrib/libc++/include/__config
==============================================================================
--- head/contrib/libc++/include/__config Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__config Thu Jan 15 21:17:36 2015 (r277217)
@@ -19,6 +19,11 @@
#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
#endif
+#if !_WIN32
+#include <unistd.h>
+#include <errno.h> // for ELAST on FreeBSD
+#endif
+
#define _LIBCPP_VERSION 1101
#define _LIBCPP_ABI_VERSION 1
@@ -106,6 +111,13 @@
# endif
#endif // __sun__
+#if defined(__native_client__)
+ // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
+ // including accesses to the special files under /dev. C++11's
+ // std::random_device is instead exposed through a NaCl syscall.
+# define _LIBCPP_USING_NACL_RANDOM
+#endif // defined(__native_client__)
+
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
# include <endian.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -194,7 +206,7 @@
#endif
#ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
+#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
#endif
#ifndef _LIBCPP_ALWAYS_INLINE
@@ -203,6 +215,11 @@
#if defined(__clang__)
+#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \
+ !defined(__arm__)
+#define _LIBCPP_ALTERNATE_STRING_LAYOUT
+#endif
+
#if __has_feature(cxx_alignas)
# define _ALIGNAS_TYPE(x) alignas(x)
# define _ALIGNAS(x) alignas(x)
@@ -215,14 +232,10 @@
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#endif
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
-#ifdef __linux__
-#define _LIBCPP_HAS_NO_UNICODE_CHARS
-#else
+#if __cplusplus < 201103L
typedef __char16_t char16_t;
typedef __char32_t char32_t;
#endif
-#endif
#if !(__has_feature(cxx_exceptions))
#define _LIBCPP_NO_EXCEPTIONS
@@ -246,6 +259,8 @@ typedef __char32_t char32_t;
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
+#define _LIBCPP_UNUSED __attribute__((__unused__))
+
#if !(__has_feature(cxx_defaulted_functions))
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#endif // !(__has_feature(cxx_defaulted_functions))
@@ -308,10 +323,16 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
+#if !(__has_feature(cxx_relaxed_constexpr))
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+#endif
+
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
#if defined(__FreeBSD__)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
+#elif defined(__ANDROID__)
+#define _LIBCPP_HAS_QUICK_EXIT
#elif defined(__linux__)
#include <features.h>
#if __GLIBC_PREREQ(2, 15)
@@ -326,13 +347,19 @@ typedef __char32_t char32_t;
#if (__has_feature(cxx_noexcept))
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
+# define _NOEXCEPT_OR_FALSE(x) noexcept(x)
#else
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
+# define _NOEXCEPT_OR_FALSE(x) false
#endif
#if __has_feature(underlying_type)
-# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
+# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#endif
+
+#if __has_feature(is_literal)
+# define _LIBCPP_IS_LITERAL(T) __is_literal(T)
#endif
// Inline namespaces are available in Clang regardless of C++ dialect.
@@ -345,6 +372,10 @@ namespace std {
}
}
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
#elif defined(__GNUC__)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -352,15 +383,33 @@ namespace std {
#define _LIBCPP_NORETURN __attribute__((noreturn))
+#define _LIBCPP_UNUSED __attribute__((__unused__))
+
+#if _GNUC_VER >= 407
+#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
+#endif
+
#if !__EXCEPTIONS
#define _LIBCPP_NO_EXCEPTIONS
#endif
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+// constexpr was added to GCC in 4.6.
+#if _GNUC_VER < 406
+#define _LIBCPP_HAS_NO_CONSTEXPR
+// Can only use constexpr in c++11 mode.
+#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
#define _LIBCPP_HAS_NO_CONSTEXPR
+#endif
+
+// No version of GCC supports relaxed constexpr rules
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#ifndef __GXX_EXPERIMENTAL_CXX0X__
@@ -390,9 +439,7 @@ namespace std {
#endif
#if _GNUC_VER < 404
-#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
#define _LIBCPP_HAS_NO_DECLTYPE
-#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_VARIADICS
@@ -403,6 +450,11 @@ namespace std {
#define _LIBCPP_HAS_NO_NULLPTR
#endif
+#if _GNUC_VER < 407
+#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#endif
+
#endif // __GXX_EXPERIMENTAL_CXX0X__
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
@@ -415,21 +467,28 @@ namespace _LIBCPP_NAMESPACE {
using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
}
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
#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_CXX14_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 _LIBCPP_UNUSED
#define _ALIGNAS(x) __declspec(align(x))
#define _LIBCPP_HAS_NO_VARIADICS
-#define _NOEXCEPT throw()
+#define _NOEXCEPT throw ()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
#define _LIBCPP_END_NAMESPACE_STD }
@@ -439,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr
namespace std {
}
+#define _LIBCPP_HAS_NO_ASAN
+
#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 _LIBCPP_UNUSED
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
@@ -455,7 +518,6 @@ namespace std {
#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)
@@ -471,13 +533,19 @@ namespace std {
}
}
-#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__
+#define _LIBCPP_HAS_NO_ASAN
+
+#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef unsigned short char16_t;
typedef unsigned int char32_t;
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
+#ifndef __SIZEOF_INT128__
+#define _LIBCPP_HAS_NO_INT128
+#endif
+
#ifdef _LIBCPP_HAS_NO_STATIC_ASSERT
template <bool> struct __static_assert_test;
@@ -515,12 +583,20 @@ template <unsigned> struct __static_asse
#define __has_feature(__x) 0
#endif
-#if __has_feature(cxx_explicit_conversions)
+#ifndef __has_builtin
+#define __has_builtin(__x) 0
+#endif
+
+#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
# define _LIBCPP_EXPLICIT explicit
#else
# define _LIBCPP_EXPLICIT
#endif
+#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete)
+# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
+#endif
+
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
@@ -546,16 +622,21 @@ template <unsigned> struct __static_asse
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE
-#define _LIBCPP_EXTERN_TEMPLATE(...)
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE2
#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
#endif
+#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
+#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
+#endif
+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
+
#ifdef __FreeBSD__
#define _DECLARE_C99_LDBL_MATH 1
#endif
@@ -568,21 +649,39 @@ template <unsigned> struct __static_asse
#define _LIBCPP_WCTYPE_IS_MASK
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__)
-#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
-# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
-#endif
+#if defined(ELAST)
+#define _LIBCPP_ELAST ELAST
+#elif defined(__linux__)
+#define _LIBCPP_ELAST 4095
+#elif defined(_NEWLIB_VERSION)
+#define _LIBCPP_ELAST __ELASTERROR
+#elif defined(__APPLE__)
+// Not _LIBCPP_ELAST needed on Apple
+#elif defined(__sun__)
+#define _LIBCPP_ELAST ESTALE
+#else
+// Warn here so that the person doing the libcxx port has an easier time:
+#warning This platform's ELAST hasn't been ported yet
#endif
#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
-# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
+# if defined(__FreeBSD__)
+// Making the std::pair copy constructor trivial breaks ABI compatibility with
+// earlier versions of libc++ shipped by FreeBSD, so turn it off by default.
+// See also http://svnweb.freebsd.org/changeset/base/261801
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
+# else
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
+# endif
#endif
#ifndef _LIBCPP_STD_VER
# if __cplusplus <= 201103L
# define _LIBCPP_STD_VER 11
+# elif __cplusplus <= 201402L
+# define _LIBCPP_STD_VER 14
# else
-# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification
+# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification
# endif
#endif // _LIBCPP_STD_VER
@@ -593,21 +692,30 @@ template <unsigned> struct __static_asse
#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
+#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#else
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11
+#endif
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __sanitizer_annotate_contiguous_container(
+ const void *, const void *, const void *, const void *);
+#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)
+# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__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
@@ -618,4 +726,9 @@ template <unsigned> struct __static_asse
# define _LIBCPP_WEAK __attribute__((__weak__))
#endif
+#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
+# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
+ _LIBCPP_HAS_NO_THREADS is defined.
+#endif
+
#endif // _LIBCPP_CONFIG
Modified: head/contrib/libc++/include/__debug
==============================================================================
--- head/contrib/libc++/include/__debug Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__debug Thu Jan 15 21:17:36 2015 (r277217)
@@ -11,19 +11,23 @@
#ifndef _LIBCPP_DEBUG_H
#define _LIBCPP_DEBUG_H
+#include <__config>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
-
# include <cstdlib>
# include <cstdio>
# include <cstddef>
# ifndef _LIBCPP_ASSERT
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
# endif
+#endif
+#ifndef _LIBCPP_ASSERT
+# define _LIBCPP_ASSERT(x, m) ((void)0)
#endif
#if _LIBCPP_DEBUG_LEVEL >= 2
Modified: head/contrib/libc++/include/__functional_03
==============================================================================
--- head/contrib/libc++/include/__functional_03 Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__functional_03 Thu Jan 15 21:17:36 2015 (r277217)
@@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
__base* __f_;
template <class _Fp>
+ _LIBCPP_INLINE_VISIBILITY
static bool __not_null(const _Fp&) {return true;}
template <class _R2>
- static bool __not_null(const function<_Rp()>& __p) {return __p;}
+ _LIBCPP_INLINE_VISIBILITY
+ static bool __not_null(_R2 (*__p)()) {return __p;}
+ template <class _R2>
+ _LIBCPP_INLINE_VISIBILITY
+ static bool __not_null(const function<_R2()>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;}
template <class _R2, class _B0>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;}
template <class _R2, class _B0, class _B1>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;}
template <class _R2, class _B0, class _B1, class _B2>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY
typename __mu_return1<true, _Ti, _Uj...>::type
__mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>)
{
- __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj))...);
+ __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj))...);
}
template <class _Ti, class ..._Uj>
@@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj)
{
const size_t _Indx = is_placeholder<_Ti>::value - 1;
// compiler bug workaround
- typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj);
+ typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj);
return __t;
-// return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj));
+// return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj));
}
template <class _Ti, class _Uj>
@@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs,
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
_Args&& __args)
{
- return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
+ return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...);
}
template<class _Fp, class ..._BoundArgs>
Modified: head/contrib/libc++/include/__functional_base
==============================================================================
--- head/contrib/libc++/include/__functional_base Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__functional_base Thu Jan 15 21:17:36 2015 (r277217)
@@ -451,10 +451,10 @@ public:
}
};
-template <class _Tp> struct ____is_reference_wrapper : public false_type {};
-template <class _Tp> struct ____is_reference_wrapper<reference_wrapper<_Tp> > : public true_type {};
+template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
+template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp> struct __is_reference_wrapper
- : public ____is_reference_wrapper<typename remove_cv<_Tp>::type> {};
+ : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
Modified: head/contrib/libc++/include/__functional_base_03
==============================================================================
--- head/contrib/libc++/include/__functional_base_03 Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__functional_base_03 Thu Jan 15 21:17:36 2015 (r277217)
@@ -1027,7 +1027,7 @@ public:
typename __invoke_return0<type&, _A0>::type
operator() (_A0& __a0) const
{
- return __invoke(get(), __a0);
+ return __invoke<type&, _A0>(get(), __a0);
}
template <class _A0, class _A1>
@@ -1035,7 +1035,7 @@ public:
typename __invoke_return1<type&, _A0, _A1>::type
operator() (_A0& __a0, _A1& __a1) const
{
- return __invoke(get(), __a0, __a1);
+ return __invoke<type&, _A0, _A1>(get(), __a0, __a1);
}
template <class _A0, class _A1, class _A2>
@@ -1043,14 +1043,14 @@ public:
typename __invoke_return2<type&, _A0, _A1, _A2>::type
operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
{
- return __invoke(get(), __a0, __a1, __a2);
+ return __invoke<type&, _A0, _A1, _A2>(get(), __a0, __a1, __a2);
}
};
-template <class _Tp> struct ____is_reference_wrapper : public false_type {};
-template <class _Tp> struct ____is_reference_wrapper<reference_wrapper<_Tp> > : public true_type {};
+template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
+template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp> struct __is_reference_wrapper
- : public ____is_reference_wrapper<typename remove_cv<_Tp>::type> {};
+ : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
Modified: head/contrib/libc++/include/__hash_table
==============================================================================
--- head/contrib/libc++/include/__hash_table Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__hash_table Thu Jan 15 21:17:36 2015 (r277217)
@@ -20,11 +20,7 @@
#include <__undef_min_max>
-#ifdef _LIBCPP_DEBUG
-# include <__debug>
-#else
-# define _LIBCPP_ASSERT(x, m) ((void)0)
-#endif
+#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
Modified: head/contrib/libc++/include/__locale
==============================================================================
--- head/contrib/libc++/include/__locale Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__locale Thu Jan 15 21:17:36 2015 (r277217)
@@ -21,11 +21,22 @@
#include <locale.h>
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
# include <support/win32/locale_win32.h>
-#elif _AIX
+#elif defined(_AIX)
# include <support/ibm/xlocale.h>
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
+#elif defined(__ANDROID__)
+// Android gained the locale aware functions in L (API level 21)
+# include <android/api-level.h>
+# if __ANDROID_API__ <= 20
+# include <support/android/locale_bionic.h>
+# endif
+#elif defined(__sun__)
+# include <support/solaris/xlocale.h>
+#elif defined(_NEWLIB_VERSION)
+# include <support/newlib/xlocale.h>
+#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
+ || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
# include <xlocale.h>
-#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
+#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -341,13 +352,15 @@ public:
static const mask punct = _PUNCT;
static const mask xdigit = _HEX;
static const mask blank = _BLANK;
-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__)
#ifdef __APPLE__
typedef __uint32_t mask;
#elif defined(__FreeBSD__)
typedef unsigned long mask;
#elif defined(__EMSCRIPTEN__) || defined(__NetBSD__)
typedef unsigned short mask;
+#elif defined(__ANDROID__)
+ typedef unsigned char mask;
#endif
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
@@ -357,7 +370,12 @@ public:
static const mask alpha = _CTYPE_A;
static const mask digit = _CTYPE_D;
static const mask punct = _CTYPE_P;
+# if defined(__ANDROID__)
+ static const mask xdigit = _CTYPE_X | _CTYPE_D;
+# else
static const mask xdigit = _CTYPE_X;
+# endif
+
# if defined(__NetBSD__)
static const mask blank = _CTYPE_BL;
# else
Modified: head/contrib/libc++/include/__mutex_base
==============================================================================
--- head/contrib/libc++/include/__mutex_base Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__mutex_base Thu Jan 15 21:17:36 2015 (r277217)
@@ -22,6 +22,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#ifndef _LIBCPP_HAS_NO_THREADS
+
class _LIBCPP_TYPE_VIS mutex
{
pthread_mutex_t __m_;
@@ -254,19 +256,13 @@ void
swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT
{__x.swap(__y);}
-struct _LIBCPP_TYPE_VIS cv_status
+//enum class cv_status
+_LIBCPP_DECLARE_STRONG_ENUM(cv_status)
{
- enum __lx {
- no_timeout,
- timeout
- };
-
- __lx __v_;
-
- _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {}
- _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;}
-
+ no_timeout,
+ timeout
};
+_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
class _LIBCPP_TYPE_VIS condition_variable
{
@@ -288,7 +284,7 @@ public:
void notify_one() _NOEXCEPT;
void notify_all() _NOEXCEPT;
- void wait(unique_lock<mutex>& __lk);
+ void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
template <class _Predicate>
void wait(unique_lock<mutex>& __lk, _Predicate __pred);
@@ -319,8 +315,9 @@ public:
private:
void __do_timed_wait(unique_lock<mutex>& __lk,
- chrono::time_point<chrono::system_clock, chrono::nanoseconds>);
+ chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
};
+#endif // !_LIBCPP_HAS_NO_THREADS
template <class _To, class _Rep, class _Period>
inline _LIBCPP_INLINE_VISIBILITY
@@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _
return __r;
}
+#ifndef _LIBCPP_HAS_NO_THREADS
template <class _Predicate>
void
condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred)
@@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock
_VSTD::move(__pred));
}
+#endif // !_LIBCPP_HAS_NO_THREADS
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___MUTEX_BASE
Copied: head/contrib/libc++/include/__refstring (from r276792, vendor/libc++/dist/include/__refstring)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/contrib/libc++/include/__refstring Thu Jan 15 21:17:36 2015 (r277217, copy of r276792, vendor/libc++/dist/include/__refstring)
@@ -0,0 +1,139 @@
+//===------------------------ __refstring ---------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___REFSTRING
+#define _LIBCPP___REFSTRING
+
+#include <__config>
+#include <cstddef>
+#include <cstring>
+#if __APPLE__
+#include <dlfcn.h>
+#include <mach-o/dyld.h>
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+class _LIBCPP_HIDDEN __libcpp_refstring
+{
+private:
+ const char* str_;
+
+ typedef int count_t;
+
+ struct _Rep_base
+ {
+ std::size_t len;
+ std::size_t cap;
+ count_t count;
+ };
+
+ static
+ _Rep_base*
+ rep_from_data(const char *data_) _NOEXCEPT
+ {
+ char *data = const_cast<char *>(data_);
+ return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base));
+ }
+ static
+ char *
+ data_from_rep(_Rep_base *rep) _NOEXCEPT
+ {
+ char *data = reinterpret_cast<char *>(rep);
+ return data + sizeof(*rep);
+ }
+
+#if __APPLE__
+ static
+ const char*
+ compute_gcc_empty_string_storage() _NOEXCEPT
+ {
+ void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
+ if (handle == nullptr)
+ return nullptr;
+ void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE");
+ if (sym == nullptr)
+ return nullptr;
+ return data_from_rep(reinterpret_cast<_Rep_base *>(sym));
+ }
+
+ static
+ const char*
+ get_gcc_empty_string_storage() _NOEXCEPT
+ {
+ static const char* p = compute_gcc_empty_string_storage();
+ return p;
+ }
+
+ bool
+ uses_refcount() const
+ {
+ return str_ != get_gcc_empty_string_storage();
+ }
+#else
+ bool
+ uses_refcount() const
+ {
+ return true;
+ }
+#endif
+
+public:
+ explicit __libcpp_refstring(const char* msg) {
+ std::size_t len = strlen(msg);
+ _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1));
+ rep->len = len;
+ rep->cap = len;
+ rep->count = 0;
+ char *data = data_from_rep(rep);
+ std::memcpy(data, msg, len + 1);
+ str_ = data;
+ }
+
+ __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_)
+ {
+ if (uses_refcount())
+ __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+ }
+
+ __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT
+ {
+ bool adjust_old_count = uses_refcount();
+ struct _Rep_base *old_rep = rep_from_data(str_);
+ str_ = s.str_;
+ if (uses_refcount())
+ __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+ if (adjust_old_count)
+ {
+ if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0)
+ {
+ ::operator delete(old_rep);
+ }
+ }
+ return *this;
+ }
+
+ ~__libcpp_refstring()
+ {
+ if (uses_refcount())
+ {
+ _Rep_base* rep = rep_from_data(str_);
+ if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0)
+ {
+ ::operator delete(rep);
+ }
+ }
+ }
+
+ const char* c_str() const _NOEXCEPT {return str_;}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif //_LIBCPP___REFSTRING
Modified: head/contrib/libc++/include/__sso_allocator
==============================================================================
--- head/contrib/libc++/include/__sso_allocator Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__sso_allocator Thu Jan 15 21:17:36 2015 (r277217)
@@ -55,14 +55,14 @@ public:
__allocated_ = true;
return (pointer)&buf_;
}
- return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));
+ return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));
}
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type)
{
if (__p == (pointer)&buf_)
__allocated_ = false;
else
- ::operator delete(__p);
+ _VSTD::__deallocate(__p);
}
_LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
Modified: head/contrib/libc++/include/__tree
==============================================================================
--- head/contrib/libc++/include/__tree Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__tree Thu Jan 15 21:17:36 2015 (r277217)
@@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase
__begin_node() = __r.__ptr_;
--size();
__node_allocator& __na = __node_alloc();
- __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
__tree_remove(__end_node()->__left_,
static_cast<__node_base_pointer>(__np));
+ __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
__node_traits::deallocate(__na, __np, 1);
return __r;
}
Modified: head/contrib/libc++/include/__tuple
==============================================================================
--- head/contrib/libc++/include/__tuple Thu Jan 15 19:52:19 2015 (r277216)
+++ head/contrib/libc++/include/__tuple Thu Jan 15 21:17:36 2015 (r277217)
@@ -27,6 +27,32 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+// __lazy_and
+
+template <bool _Last, class ..._Preds>
+struct __lazy_and_impl;
+
+template <class ..._Preds>
+struct __lazy_and_impl<false, _Preds...> : false_type {};
+
+template <>
+struct __lazy_and_impl<true> : true_type {};
+
+template <class _Pred>
+struct __lazy_and_impl<true, _Pred> : integral_constant<bool, _Pred::type::value> {};
+
+template <class _Hp, class ..._Tp>
+struct __lazy_and_impl<true, _Hp, _Tp...> : __lazy_and_impl<_Hp::type::value, _Tp...> {};
+
+template <class _P1, class ..._Pr>
+struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {};
+
+// __lazy_not
+
+template <class _Pred>
+struct __lazy_not : integral_constant<bool, !_Pred::type::value> {};
+
+
template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size;
template <class _Tp>
@@ -219,19 +245,30 @@ struct __make_tuple_types
// __tuple_convertible
-template <bool, class _Tp, class _Up>
+template <class, class>
struct __tuple_convertible_imp : public false_type {};
template <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
-struct __tuple_convertible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
+struct __tuple_convertible_imp<__tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
: public integral_constant<bool,
is_convertible<_Tp0, _Up0>::value &&
- __tuple_convertible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
+ __tuple_convertible_imp<__tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
template <>
-struct __tuple_convertible_imp<true, __tuple_types<>, __tuple_types<> >
+struct __tuple_convertible_imp<__tuple_types<>, __tuple_types<> >
: public true_type {};
+template <bool, class, class>
+struct __tuple_convertible_apply : public false_type {};
+
+template <class _Tp, class _Up>
+struct __tuple_convertible_apply<true, _Tp, _Up>
+ : public __tuple_convertible_imp<
+ typename __make_tuple_types<_Tp>::type
+ , typename __make_tuple_types<_Up>::type
+ >
+{};
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list