Compare commits

..

11 Commits

Author SHA1 Message Date
Howard Hinnant
828c2bb86d Creating a stable branch for Apple
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@147146 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-22 15:14:10 +00:00
Dave Zarzycki
1d41df08d3 More different better header install locations
<rdar://problem/9866843> Need to change install location of libc++ headers


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@138524 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24 23:37:58 +00:00
Dave Zarzycki
85c01426ad Install headers in more clang relative locations
Fix Apple bug 9978441 by installing the headers in yet more locations so
that clang may find them when installed as a part of iOS SDKs.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@138209 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 19:00:48 +00:00
Howard Hinnant
3006f595eb Fixed <rdar://problem/9969674>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@137860 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 20:30:53 +00:00
Howard Hinnant
84fd172cd6 Fix r9901265
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@137565 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-13 23:20:02 +00:00
Howard Hinnant
9b3829cb5b Install headers at usr/clang-ide/lib/c++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@137152 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 21:34:49 +00:00
Howard Hinnant
da9c0f1fba Fix PR10507. http://llvm.org/bugs/show_bug.cgi?id=10507
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136575 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 17:40:17 +00:00
Howard Hinnant
a9ad2ca8bd Synch up with recent changes in trunk
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136574 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 17:35:20 +00:00
Howard Hinnant
8ffa5d58e0 Correct misspelling: _LIBCPP_APPLE_STABLE_ABI -> _LIBCPP_STABLE_APPLE_ABI
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136570 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 16:37:03 +00:00
Howard Hinnant
791e11cf33 Fix radar 9866843
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136569 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 16:35:55 +00:00
Howard Hinnant
4d933b2b44 Apple branch created
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136568 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 16:28:35 +00:00
4790 changed files with 447988 additions and 3295 deletions

View File

@@ -21,14 +21,3 @@ N: Bjorn Reese
E: breese@users.sourceforge.net
D: Initial regex prototype
N: David Chisnall
E: theraven at theravensnest dot org
D: FreeBSD port and libcxxrt support.
N: Ruben Van Boxem
E: vanboxem dot ruben at gmail dot com
D: Initial Windows patches.
N: Arvid Picciani
E: aep at exys dot org
D: Minor patches and musl port.

View File

@@ -30,33 +30,40 @@ clean::
installhdrs::
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1/ext
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1/
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/*
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1/ext
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/c++/v1/ext/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/clang-ide/lib/c++/v1/ext/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/clang-ide/lib/c++/v1/ext/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/usr/lib/c++/v1/ext/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/usr/lib/c++/v1/ext/*
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/c++/v1/ext/*
install:: installhdrs $(DESTDIR)

View File

@@ -687,12 +687,12 @@ move_backward(__bit_iterator<_C, _IsConst> __first, __bit_iterator<_C, _IsConst>
// swap_ranges
template <class __C1, class __C2>
__bit_iterator<__C2, false>
__swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
template <class _C1, class _C2>
__bit_iterator<_C2, false>
__swap_ranges_aligned(__bit_iterator<_C1, false> __first, __bit_iterator<_C1, false> __last,
__bit_iterator<_C2, false> __result)
{
typedef __bit_iterator<__C1, false> _I1;
typedef __bit_iterator<_C1, false> _I1;
typedef typename _I1::difference_type difference_type;
typedef typename _I1::__storage_type __storage_type;
static const unsigned __bits_per_word = _I1::__bits_per_word;
@@ -737,12 +737,12 @@ __swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1,
return __result;
}
template <class __C1, class __C2>
__bit_iterator<__C2, false>
__swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
template <class _C1, class _C2>
__bit_iterator<_C2, false>
__swap_ranges_unaligned(__bit_iterator<_C1, false> __first, __bit_iterator<_C1, false> __last,
__bit_iterator<_C2, false> __result)
{
typedef __bit_iterator<__C1, false> _I1;
typedef __bit_iterator<_C1, false> _I1;
typedef typename _I1::difference_type difference_type;
typedef typename _I1::__storage_type __storage_type;
static const unsigned __bits_per_word = _I1::__bits_per_word;
@@ -837,11 +837,11 @@ __swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1
return __result;
}
template <class __C1, class __C2>
template <class _C1, class _C2>
inline _LIBCPP_INLINE_VISIBILITY
__bit_iterator<__C2, false>
swap_ranges(__bit_iterator<__C1, false> __first1, __bit_iterator<__C1, false> __last1,
__bit_iterator<__C2, false> __first2)
__bit_iterator<_C2, false>
swap_ranges(__bit_iterator<_C1, false> __first1, __bit_iterator<_C1, false> __last1,
__bit_iterator<_C2, false> __first2)
{
if (__first1.__ctz_ == __first2.__ctz_)
return __swap_ranges_aligned(__first1, __last1, __first2);
@@ -1213,15 +1213,15 @@ private:
template <class _D, bool _IC> friend __bit_iterator<_D, false> copy_backward(__bit_iterator<_D, _IC> __first,
__bit_iterator<_D, _IC> __last,
__bit_iterator<_D, false> __result);
template <class __C1, class __C2>friend __bit_iterator<__C2, false> __swap_ranges_aligned(__bit_iterator<__C1, false>,
__bit_iterator<__C1, false>,
__bit_iterator<__C2, false>);
template <class __C1, class __C2>friend __bit_iterator<__C2, false> __swap_ranges_unaligned(__bit_iterator<__C1, false>,
__bit_iterator<__C1, false>,
__bit_iterator<__C2, false>);
template <class __C1, class __C2>friend __bit_iterator<__C2, false> swap_ranges(__bit_iterator<__C1, false>,
__bit_iterator<__C1, false>,
__bit_iterator<__C2, false>);
template <class _C1, class _C2>friend __bit_iterator<_C2, false> __swap_ranges_aligned(__bit_iterator<_C1, false>,
__bit_iterator<_C1, false>,
__bit_iterator<_C2, false>);
template <class _C1, class _C2>friend __bit_iterator<_C2, false> __swap_ranges_unaligned(__bit_iterator<_C1, false>,
__bit_iterator<_C1, false>,
__bit_iterator<_C2, false>);
template <class _C1, class _C2>friend __bit_iterator<_C2, false> swap_ranges(__bit_iterator<_C1, false>,
__bit_iterator<_C1, false>,
__bit_iterator<_C2, false>);
template <class _D> friend __bit_iterator<_D, false> rotate(__bit_iterator<_D, false>,
__bit_iterator<_D, false>,
__bit_iterator<_D, false>);

View File

@@ -13,7 +13,7 @@
#pragma GCC system_header
#define _LIBCPP_VERSION 1001
#define _LIBCPP_VERSION 1000
#define _LIBCPP_ABI_VERSION 1
@@ -50,10 +50,6 @@
#ifdef _WIN32
# define _LIBCPP_LITTLE_ENDIAN 1
# define _LIBCPP_BIG_ENDIAN 0
// Compiler intrinsics (GCC or MSVC)
# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3)
# define _LIBCP_HAS_IS_BASE_OF
# endif
#endif // _WIN32
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
@@ -164,14 +160,6 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_TRAILING_RETURN
#endif
#if !(__has_feature(cxx_generalized_initializers))
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif
#if __has_feature(is_base_of)
# define _LIBCP_HAS_IS_BASE_OF
#endif
// Objective-C++ features (opt-in)
#if __has_feature(objc_arc)
#define _LIBCPP_HAS_OBJC_ARC
@@ -256,7 +244,6 @@ namespace std {
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
@@ -305,32 +292,16 @@ template <unsigned> struct __static_assert_check {};
#define __has_feature(__x) 0
#endif
#if __APPLE__ || __FreeBSD__ || _WIN32
#ifdef __APPLE__
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
#if __APPLE__ || __FreeBSD__
#define _LIBCPP_HAS_DEFAULTRUNELOCALE
#ifdef __APPLE__
#define _LIBCPP_STABLE_APPLE_ABI
#endif
#if __APPLE__ || __FreeBSD__
#ifdef __APPLE__
#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
#endif
#ifdef _LIBCPP_DEBUG2
# include <__debug>
#else
# define _LIBCPP_ASSERT(x, m) ((void)0)
#endif
#endif // _LIBCPP_CONFIG

View File

@@ -19,11 +19,7 @@
#include <cstdint>
#include <cctype>
#include <locale.h>
#if _WIN32
# include <support/win32/locale_win32.h>
#elif (__GLIBC__ || __APPLE__ || __FreeBSD__)
#include <xlocale.h>
#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_
#pragma GCC system_header
@@ -231,18 +227,18 @@ collate<_CharT>::do_compare(const char_type* __lo1, const char_type* __hi1,
template <class _CharT>
long
collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) const
collate<_CharT>::do_hash(const char_type* lo, const char_type* hi) const
{
size_t __h = 0;
const size_t __sr = __CHAR_BIT__ * sizeof(size_t) - 8;
const size_t __mask = size_t(0xF) << (__sr + 4);
for(const char_type* __p = __lo; __p != __hi; ++__p)
size_t h = 0;
const size_t sr = __CHAR_BIT__ * sizeof(size_t) - 8;
const size_t mask = size_t(0xF) << (sr + 4);
for(const char_type* p = lo; p != hi; ++p)
{
__h = (__h << 4) + *__p;
size_t __g = __h & __mask;
__h ^= __g | (__g >> __sr);
h = (h << 4) + *p;
size_t g = h & mask;
h ^= g | (g >> sr);
}
return static_cast<long>(__h);
return static_cast<long>(h);
}
extern template class _LIBCPP_VISIBLE collate<char>;
@@ -306,36 +302,13 @@ locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x,
class _LIBCPP_VISIBLE ctype_base
{
public:
#if __GLIBC__
#ifdef __GLIBC__
typedef unsigned short mask;
static const mask space = _ISspace;
static const mask print = _ISprint;
static const mask cntrl = _IScntrl;
static const mask upper = _ISupper;
static const mask lower = _ISlower;
static const mask alpha = _ISalpha;
static const mask digit = _ISdigit;
static const mask punct = _ISpunct;
static const mask xdigit = _ISxdigit;
static const mask blank = _ISblank;
#elif _WIN32
typedef unsigned short mask;
static const mask space = _SPACE;
static const mask print = _BLANK|_PUNCT|_ALPHA|_DIGIT;
static const mask cntrl = _CONTROL;
static const mask upper = _UPPER;
static const mask lower = _LOWER;
static const mask alpha = _ALPHA;
static const mask digit = _DIGIT;
static const mask punct = _PUNCT;
static const mask xdigit = _HEX;
static const mask blank = _BLANK;
#elif (__APPLE__ || __FreeBSD__)
#if __APPLE__
#else
typedef __uint32_t mask;
#elif __FreeBSD__
typedef unsigned long mask;
#endif
#if __APPLE__
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
static const mask cntrl = _CTYPE_C;
@@ -346,19 +319,18 @@ public:
static const mask punct = _CTYPE_P;
static const mask xdigit = _CTYPE_X;
static const mask blank = _CTYPE_B;
#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__
typedef unsigned long mask;
static const mask space = 1<<0;
static const mask print = 1<<1;
static const mask cntrl = 1<<2;
static const mask upper = 1<<3;
static const mask lower = 1<<4;
static const mask alpha = 1<<5;
static const mask digit = 1<<6;
static const mask punct = 1<<7;
static const mask xdigit = 1<<8;
static const mask blank = 1<<9;
#endif // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__
#else // __APPLE__
static const mask space = _ISspace;
static const mask print = _ISprint;
static const mask cntrl = _IScntrl;
static const mask upper = _ISupper;
static const mask lower = _ISlower;
static const mask alpha = _ISalpha;
static const mask digit = _ISdigit;
static const mask punct = _ISpunct;
static const mask xdigit = _ISxdigit;
static const mask blank = _ISblank;
#endif // __APPLE__
static const mask alnum = alpha | digit;
static const mask graph = alnum | punct;
@@ -569,7 +541,7 @@ public:
#endif
_LIBCPP_ALWAYS_INLINE const mask* table() const _NOEXCEPT {return __tab_;}
static const mask* classic_table() _NOEXCEPT;
#if defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
static const int* __classic_upper_table() _NOEXCEPT;
static const int* __classic_lower_table() _NOEXCEPT;
#endif

View File

@@ -141,14 +141,14 @@ public:
private:
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__split_buffer& __c, true_type)
void __move_assign_alloc(const __split_buffer& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__split_buffer& __c, false_type) _NOEXCEPT
void __move_assign_alloc(const __split_buffer& __c, false_type) _NOEXCEPT
{}
_LIBCPP_INLINE_VISIBILITY
@@ -208,7 +208,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
__alloc_rr& __a = this->__alloc();
do
{
__alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_));
__alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), value_type());
++this->__end_;
--__n;
} while (__n > 0);

View File

@@ -593,6 +593,9 @@ template <class BidirectionalIterator, class Compare>
#include <utility>
#include <memory>
#include <iterator>
#ifdef _LIBCPP_DEBUG
#include <cassert>
#endif
#include <cstdlib>
#pragma GCC system_header
@@ -673,7 +676,7 @@ public:
bool operator()(const _T1& __x, const _T2& __y) {return !__p_(__x, __y);}
};
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
template <class _Compare>
struct __debug_less
@@ -685,12 +688,12 @@ struct __debug_less
{
bool __r = __comp_(__x, __y);
if (__r)
_LIBCPP_ASSERT(!__comp_(__y, __x), "Comparator does not induce a strict weak ordering");
assert(!__comp_(__y, __x));
return __r;
}
};
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
// Precondition: __x != 0
inline _LIBCPP_INLINE_VISIBILITY unsigned __ctz(unsigned __x) {return __builtin_ctz (__x);}
@@ -2230,8 +2233,6 @@ min(const _Tp& __a, const _Tp& __b)
return _VSTD::min(__a, __b, __less<_Tp>());
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _Tp, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
@@ -2248,8 +2249,6 @@ min(initializer_list<_Tp> __t)
return *_VSTD::min_element(__t.begin(), __t.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// max_element
template <class _ForwardIterator, class _Compare>
@@ -2294,8 +2293,6 @@ max(const _Tp& __a, const _Tp& __b)
return _VSTD::max(__a, __b, __less<_Tp>());
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _Tp, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
@@ -2312,8 +2309,6 @@ max(initializer_list<_Tp> __t)
return *_VSTD::max_element(__t.begin(), __t.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// minmax_element
template <class _ForwardIterator, class _Compare>
@@ -2393,8 +2388,6 @@ minmax(const _Tp& __a, const _Tp& __b)
return _VSTD::minmax(__a, __b, __less<_Tp>());
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
pair<_Tp, _Tp>
@@ -2415,8 +2408,6 @@ minmax(initializer_list<_Tp> __t, _Compare __comp)
return pair<_Tp, _Tp>(*__p.first, *__p.second);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// random_shuffle
// __independent_bits_engine
@@ -3638,14 +3629,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__sort<_Comp_ref>(__first, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__sort<_Comp_ref>(__first, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -3672,15 +3663,6 @@ sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last)
_VSTD::sort(__first.base(), __last.base());
}
template <class _Tp, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
void
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last, _Compare __comp)
{
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
_VSTD::sort<_Tp*, _Comp_ref>(__first.base(), __last.base(), __comp);
}
extern template void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
extern template void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
extern template void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
@@ -3744,14 +3726,14 @@ inline _LIBCPP_INLINE_VISIBILITY
_ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __lower_bound<_Comp_ref>(__first, __last, __value, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __lower_bound<_Comp_ref>(__first, __last, __value, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _ForwardIterator, class _Tp>
@@ -3792,14 +3774,14 @@ inline _LIBCPP_INLINE_VISIBILITY
_ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __upper_bound<_Comp_ref>(__first, __last, __value, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __upper_bound<_Comp_ref>(__first, __last, __value, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _ForwardIterator, class _Tp>
@@ -3852,14 +3834,14 @@ inline _LIBCPP_INLINE_VISIBILITY
pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __equal_range<_Comp_ref>(__first, __last, __value, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __equal_range<_Comp_ref>(__first, __last, __value, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _ForwardIterator, class _Tp>
@@ -3887,14 +3869,14 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __binary_search<_Comp_ref>(__first, __last, __value, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __binary_search<_Comp_ref>(__first, __last, __value, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _ForwardIterator, class _Tp>
@@ -3937,14 +3919,14 @@ _OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -4111,16 +4093,16 @@ inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
__buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
__h.reset(__buf.first);
}
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return _VSTD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __c, __len1, __len2,
__buf.first, __buf.second);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return _VSTD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2,
__buf.first, __buf.second);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _BidirectionalIterator>
@@ -4322,14 +4304,14 @@ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar
__buf = _VSTD::get_temporary_buffer<value_type>(__len);
__h.reset(__buf.first);
}
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__stable_sort<_Comp_ref>(__first, __last, __c, __len, __buf.first, __buf.second);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4471,14 +4453,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__push_heap_back<_Comp_ref>(__first, __last, __c, __last - __first);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__push_heap_back<_Comp_ref>(__first, __last, __comp, __last - __first);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4509,14 +4491,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__pop_heap<_Comp_ref>(__first, __last, __c, __last - __first);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4549,14 +4531,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__make_heap<_Comp_ref>(__first, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__make_heap<_Comp_ref>(__first, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4583,14 +4565,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__sort_heap<_Comp_ref>(__first, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__sort_heap<_Comp_ref>(__first, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4627,14 +4609,14 @@ void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
_Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__partial_sort<_Comp_ref>(__first, __middle, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__partial_sort<_Comp_ref>(__first, __middle, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4677,14 +4659,14 @@ _RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator, class _RandomAccessIterator>
@@ -4889,14 +4871,14 @@ inline _LIBCPP_INLINE_VISIBILITY
void
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
__nth_element<_Comp_ref>(__first, __nth, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
__nth_element<_Comp_ref>(__first, __nth, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _RandomAccessIterator>
@@ -4930,14 +4912,14 @@ bool
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
_Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2>
@@ -4983,14 +4965,14 @@ _OutputIterator
set_union(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -5035,14 +5017,14 @@ _OutputIterator
set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -5089,14 +5071,14 @@ _OutputIterator
set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -5148,14 +5130,14 @@ _OutputIterator
set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -5192,14 +5174,14 @@ bool
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _InputIterator1, class _InputIterator2>
@@ -5247,14 +5229,14 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __next_permutation<_Comp_ref>(__first, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __next_permutation<_Comp_ref>(__first, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _BidirectionalIterator>
@@ -5300,14 +5282,14 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
#ifdef _LIBCPP_DEBUG2
#ifdef _LIBCPP_DEBUG
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
__debug_less<_Compare> __c(__comp);
return __prev_permutation<_Comp_ref>(__first, __last, __c);
#else // _LIBCPP_DEBUG2
#else // _LIBCPP_DEBUG
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
return __prev_permutation<_Comp_ref>(__first, __last, __comp);
#endif // _LIBCPP_DEBUG2
#endif // _LIBCPP_DEBUG
}
template <class _BidirectionalIterator>

View File

@@ -72,320 +72,4 @@ const int __elast2 = 105;
#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
// supply errno values likely to be missing, particularly on Windows
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT 9901
#endif
#ifndef EADDRINUSE
#define EADDRINUSE 9902
#endif
#ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL 9903
#endif
#ifndef EISCONN
#define EISCONN 9904
#endif
#ifndef EBADMSG
#define EBADMSG 9905
#endif
#ifndef ECONNABORTED
#define ECONNABORTED 9906
#endif
#ifndef EALREADY
#define EALREADY 9907
#endif
#ifndef ECONNREFUSED
#define ECONNREFUSED 9908
#endif
#ifndef ECONNRESET
#define ECONNRESET 9909
#endif
#ifndef EDESTADDRREQ
#define EDESTADDRREQ 9910
#endif
#ifndef EHOSTUNREACH
#define EHOSTUNREACH 9911
#endif
#ifndef EIDRM
#define EIDRM 9912
#endif
#ifndef EMSGSIZE
#define EMSGSIZE 9913
#endif
#ifndef ENETDOWN
#define ENETDOWN 9914
#endif
#ifndef ENETRESET
#define ENETRESET 9915
#endif
#ifndef ENETUNREACH
#define ENETUNREACH 9916
#endif
#ifndef ENOBUFS
#define ENOBUFS 9917
#endif
#ifndef ENOLINK
#define ENOLINK 9918
#endif
#ifndef ENODATA
#define ENODATA 9919
#endif
#ifndef ENOMSG
#define ENOMSG 9920
#endif
#ifndef ENOPROTOOPT
#define ENOPROTOOPT 9921
#endif
#ifndef ENOSR
#define ENOSR 9922
#endif
#ifndef ENOTSOCK
#define ENOTSOCK 9923
#endif
#ifndef ENOSTR
#define ENOSTR 9924
#endif
#ifndef ENOTCONN
#define ENOTCONN 9925
#endif
#ifndef ENOTSUP
#define ENOTSUP 9926
#endif
#ifndef ECANCELED
#define ECANCELED 9927
#endif
#ifndef EINPROGRESS
#define EINPROGRESS 9928
#endif
#ifndef EOPNOTSUPP
#define EOPNOTSUPP 9929
#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK 9930
#endif
#ifndef EOWNERDEAD
#define EOWNERDEAD 9931
#endif
#ifndef EPROTO
#define EPROTO 9932
#endif
#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT 9933
#endif
#ifndef ENOTRECOVERABLE
#define ENOTRECOVERABLE 9934
#endif
#ifndef ETIME
#define ETIME 9935
#endif
#ifndef ETXTBSY
#define ETXTBSY 9936
#endif
#ifndef ETIMEDOUT
#define ETIMEDOUT 9938
#endif
#ifndef ELOOP
#define ELOOP 9939
#endif
#ifndef EOVERFLOW
#define EOVERFLOW 9940
#endif
#ifndef EPROTOTYPE
#define EPROTOTYPE 9941
#endif
#ifndef ENOSYS
#define ENOSYS 9942
#endif
#ifndef EINVAL
#define EINVAL 9943
#endif
#ifndef ERANGE
#define ERANGE 9944
#endif
#ifndef EILSEQ
#define EILSEQ 9945
#endif
// Windows Mobile doesn't appear to define these:
#ifndef E2BIG
#define E2BIG 9946
#endif
#ifndef EDOM
#define EDOM 9947
#endif
#ifndef EFAULT
#define EFAULT 9948
#endif
#ifndef EBADF
#define EBADF 9949
#endif
#ifndef EPIPE
#define EPIPE 9950
#endif
#ifndef EXDEV
#define EXDEV 9951
#endif
#ifndef EBUSY
#define EBUSY 9952
#endif
#ifndef ENOTEMPTY
#define ENOTEMPTY 9953
#endif
#ifndef ENOEXEC
#define ENOEXEC 9954
#endif
#ifndef EEXIST
#define EEXIST 9955
#endif
#ifndef EFBIG
#define EFBIG 9956
#endif
#ifndef ENAMETOOLONG
#define ENAMETOOLONG 9957
#endif
#ifndef ENOTTY
#define ENOTTY 9958
#endif
#ifndef EINTR
#define EINTR 9959
#endif
#ifndef ESPIPE
#define ESPIPE 9960
#endif
#ifndef EIO
#define EIO 9961
#endif
#ifndef EISDIR
#define EISDIR 9962
#endif
#ifndef ECHILD
#define ECHILD 9963
#endif
#ifndef ENOLCK
#define ENOLCK 9964
#endif
#ifndef ENOSPC
#define ENOSPC 9965
#endif
#ifndef ENXIO
#define ENXIO 9966
#endif
#ifndef ENODEV
#define ENODEV 9967
#endif
#ifndef ENOENT
#define ENOENT 9968
#endif
#ifndef ESRCH
#define ESRCH 9969
#endif
#ifndef ENOTDIR
#define ENOTDIR 9970
#endif
#ifndef ENOMEM
#define ENOMEM 9971
#endif
#ifndef EPERM
#define EPERM 9972
#endif
#ifndef EACCES
#define EACCES 9973
#endif
#ifndef EROFS
#define EROFS 9974
#endif
#ifndef EDEADLK
#define EDEADLK 9975
#endif
#ifndef EAGAIN
#define EAGAIN 9976
#endif
#ifndef ENFILE
#define ENFILE 9977
#endif
#ifndef EMFILE
#define EMFILE 9978
#endif
#ifndef EMLINK
#define EMLINK 9979
#endif
#endif // _LIBCPP_CERRNO

View File

@@ -106,9 +106,6 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
#include <__config>
#include <cwctype>
#include <wchar.h>
#if _WIN32
#include <support/win32/support.h> // pull in *swprintf defines
#endif // _WIN32
#pragma GCC system_header

View File

@@ -977,14 +977,14 @@ protected:
private:
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__deque_base& __c, true_type)
void __move_assign_alloc(const __deque_base& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__deque_base& __c, false_type) _NOEXCEPT
void __move_assign_alloc(const __deque_base& __c, false_type) _NOEXCEPT
{}
_LIBCPP_INLINE_VISIBILITY
@@ -1204,16 +1204,12 @@ public:
typename enable_if<__is_input_iterator<_InputIter>::value>::type* = 0);
deque(const deque& __c);
deque(const deque& __c, const allocator_type& __a);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
deque(initializer_list<value_type> __il);
deque(initializer_list<value_type> __il, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
deque& operator=(const deque& __c);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value);
@@ -1231,10 +1227,8 @@ public:
void assign(_RAIter __f, _RAIter __l,
typename enable_if<__is_random_access_iterator<_RAIter>::value>::type* = 0);
void assign(size_type __n, const value_type& __v);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
allocator_type get_allocator() const _NOEXCEPT;
@@ -1319,11 +1313,9 @@ public:
template <class _BiIter>
iterator insert (const_iterator __p, _BiIter __f, _BiIter __l,
typename enable_if<__is_bidirectional_iterator<_BiIter>::value>::type* = 0);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, initializer_list<value_type> __il)
{return insert(__p, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void pop_front();
void pop_back();
iterator erase(const_iterator __p);
@@ -1460,8 +1452,6 @@ deque<_Tp, _Allocator>::deque(const deque& __c, const allocator_type& __a)
__append(__c.begin(), __c.end());
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il)
{
@@ -1475,8 +1465,6 @@ deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il, const allocator
__append(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>&
deque<_Tp, _Allocator>::operator=(const deque& __c)

View File

@@ -203,7 +203,6 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
#include <__hash_table>
#include <functional>
#include <stdexcept>
#include <ext/__hash>
#if __DEPRECATED
#warning Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>
@@ -469,7 +468,6 @@ public:
// types
typedef _Key key_type;
typedef _Tp mapped_type;
typedef _Tp data_type;
typedef _Hash hasher;
typedef _Pred key_equal;
typedef _Alloc allocator_type;
@@ -553,8 +551,6 @@ public:
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
{return __table_.__insert_unique(__x);}
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
@@ -748,7 +744,6 @@ public:
// types
typedef _Key key_type;
typedef _Tp mapped_type;
typedef _Tp data_type;
typedef _Hash hasher;
typedef _Pred key_equal;
typedef _Alloc allocator_type;
@@ -830,8 +825,6 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);

View File

@@ -196,7 +196,6 @@ template <class Value, class Hash, class Pred, class Alloc>
#include <__config>
#include <__hash_table>
#include <functional>
#include <ext/__hash>
#if __DEPRECATED
#warning Use of the header <ext/hash_set> is deprecated. Migrate to <unordered_set>
@@ -206,7 +205,7 @@ namespace __gnu_cxx {
using namespace std;
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
template <class _Value, class _Hash = std::hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
class _LIBCPP_VISIBLE hash_set
{
@@ -275,8 +274,6 @@ public:
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
{return __table_.__insert_unique(__x);}
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
@@ -495,8 +492,6 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);

View File

@@ -580,10 +580,8 @@ public:
: base(_VSTD::move(__x)) {}
forward_list(forward_list&& __x, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
forward_list(initializer_list<value_type> __il);
forward_list(initializer_list<value_type> __il, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~forward_list() = default;
@@ -594,9 +592,7 @@ public:
__node_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
forward_list& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _InputIterator>
typename enable_if
@@ -606,9 +602,7 @@ public:
>::type
assign(_InputIterator __f, _InputIterator __l);
void assign(size_type __n, const value_type& __v);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void assign(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -683,10 +677,8 @@ public:
iterator
>::type
insert_after(const_iterator __p, _InputIterator __f, _InputIterator __l);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
{return insert_after(__p, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
iterator erase_after(const_iterator __p);
iterator erase_after(const_iterator __f, const_iterator __l);
@@ -851,8 +843,6 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il)
{
@@ -867,8 +857,6 @@ forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il,
insert_after(cbefore_begin(), __il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>&
forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
@@ -922,8 +910,6 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
forward_list<_Tp, _Alloc>&
@@ -933,8 +919,6 @@ forward_list<_Tp, _Alloc>::operator=(initializer_list<value_type> __il)
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Alloc>
template <class _InputIterator>
typename enable_if
@@ -970,8 +954,6 @@ forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v)
erase_after(__i, __e);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
void
@@ -980,8 +962,6 @@ forward_list<_Tp, _Alloc>::assign(initializer_list<value_type> __il)
assign(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_VARIADICS

View File

@@ -51,8 +51,6 @@ template<class E> const E* end(initializer_list<E> il) noexcept;
namespace std // purposefully not versioned
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _E>
class _LIBCPP_VISIBLE initializer_list
{
@@ -96,8 +94,6 @@ end(initializer_list<_E> __il) _NOEXCEPT
return __il.end();
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
} // std
#endif // _LIBCPP_INITIALIZER_LIST

View File

@@ -742,29 +742,26 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
if (__sen)
{
typedef istreambuf_iterator<_CharT, _Traits> _I;
streamsize __n = __is.width();
if (__n <= 0)
if (__n == 0)
__n = numeric_limits<streamsize>::max() / sizeof(_CharT) - 1;
streamsize __c = 0;
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
ios_base::iostate __err = ios_base::goodbit;
while (__c < __n-1)
_I __i(__is);
_I __eof;
for (; __i != __eof && __c < __n-1; ++__i, ++__s, ++__c)
{
typename _Traits::int_type __i = __is.rdbuf()->sgetc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
{
__err |= ios_base::eofbit;
break;
}
_CharT __ch = _Traits::to_char_type(__i);
_CharT __ch = *__i;
if (__ct.is(__ct.space, __ch))
break;
*__s++ = __ch;
++__c;
__is.rdbuf()->sbumpc();
*__s = __ch;
}
*__s = _CharT();
__is.width(0);
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
__is.setstate(__err);
@@ -806,11 +803,25 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
if (__sen)
{
#if 1
typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
__is.setstate(ios_base::eofbit | ios_base::failbit);
else
__c = _Traits::to_char_type(__i);
#else
typedef istreambuf_iterator<_CharT, _Traits> _I;
_I __i(__is);
_I __eof;
if (__i != __eof)
{
__c = *__i;
if (++__i == __eof)
__is.setstate(ios_base::eofbit);
}
else
__is.setstate(ios_base::eofbit | ios_base::failbit);
#endif
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -850,42 +861,42 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
sentry __s(*this, true);
if (__s)
{
streamsize __c = 0;
if (__sb)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
typedef istreambuf_iterator<char_type, traits_type> _I;
typedef ostreambuf_iterator<char_type, traits_type> _O;
_I __i(*this);
_I __eof;
_O __o(__sb);
for (; __i != __eof; ++__i, ++__o, ++__c)
{
*__o = *__i;
if (__o.failed())
break;
}
ios_base::iostate __err = ios_base::goodbit;
while (true)
{
typename traits_type::int_type __i = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__i, _Traits::eof()))
{
if (__i == __eof)
__err |= ios_base::eofbit;
break;
}
if (traits_type::eq_int_type(
__sb->sputc(traits_type::to_char_type(__i)),
traits_type::eof()))
break;
++__gc_;
this->rdbuf()->sbumpc();
}
if (__gc_ == 0)
if (__c == 0)
__err |= ios_base::failbit;
this->setstate(__err);
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
if (__gc_ == 0)
if (__c == 0)
this->__set_failbit_and_consider_rethrow();
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
else
this->setstate(ios_base::failbit);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -910,11 +921,22 @@ basic_istream<_CharT, _Traits>::get()
sentry __s(*this, true);
if (__s)
{
__r = this->rdbuf()->sbumpc();
if (traits_type::eq_int_type(__r, traits_type::eof()))
this->setstate(ios_base::failbit | ios_base::eofbit);
streamsize __c = 0;
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
ios_base::iostate __err = ios_base::goodbit;
if (__i != __eof)
{
__r = traits_type::to_int_type(*__i);
++__c;
if (++__i == __eof)
__err |= ios_base::eofbit;
}
else
__gc_ = 1;
__err |= ios_base::failbit | ios_base::eofbit;
this->setstate(__err);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -949,31 +971,30 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
sentry __sen(*this, true);
if (__sen)
{
streamsize __c = 0;
if (__n > 0)
{
ios_base::iostate __err = ios_base::goodbit;
while (__gc_ < __n-1)
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
for (; __i != __eof && __n > 1; ++__i, ++__s, ++__c)
{
int_type __i = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__err |= ios_base::eofbit;
break;
}
char_type __ch = traits_type::to_char_type(__i);
char_type __ch = *__i;
if (traits_type::eq(__ch, __dlm))
break;
*__s++ = __ch;
++__gc_;
this->rdbuf()->sbumpc();
*__s = __ch;
}
*__s = char_type();
if (__gc_ == 0)
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
this->setstate(__err);
}
else
this->setstate(ios_base::failbit);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -1006,36 +1027,38 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
sentry __sen(*this, true);
if (__sen)
{
streamsize __c = 0;
ios_base::iostate __err = ios_base::goodbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
while (true)
typedef istreambuf_iterator<char_type, traits_type> _I;
typedef ostreambuf_iterator<char_type, traits_type> _O;
_I __i(*this);
_I __eof;
_O __o(&__sb);
for (; __i != __eof; ++__i, ++__o, ++__c)
{
typename traits_type::int_type __i = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__err |= ios_base::eofbit;
break;
}
char_type __ch = traits_type::to_char_type(__i);
char_type __ch = *__i;
if (traits_type::eq(__ch, __dlm))
break;
if (traits_type::eq_int_type(__sb.sputc(__ch), traits_type::eof()))
*__o = __ch;
if (__o.failed())
break;
++__gc_;
this->rdbuf()->sbumpc();
}
if (__i == __eof)
__err |= ios_base::eofbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
}
#endif // _LIBCPP_NO_EXCEPTIONS
if (__gc_ == 0)
if (__c == 0)
__err |= ios_base::failbit;
this->setstate(__err);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -1067,36 +1090,33 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
sentry __sen(*this, true);
if (__sen)
{
ios_base::iostate __err = ios_base::goodbit;
while (true)
streamsize __c = 0;
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
for (; __i != __eof; ++__s, --__n)
{
typename traits_type::int_type __i = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__err |= ios_base::eofbit;
break;
}
char_type __ch = traits_type::to_char_type(__i);
char_type __ch = *__i;
++__i;
++__c;
if (traits_type::eq(__ch, __dlm))
break;
if (__n < 2)
{
this->rdbuf()->sbumpc();
++__gc_;
this->setstate(ios_base::failbit);
break;
}
if (__gc_ >= __n-1)
{
__err |= ios_base::failbit;
break;
*__s = __ch;
}
*__s++ = __ch;
this->rdbuf()->sbumpc();
++__gc_;
}
if (__n > 0)
if (__n)
*__s = char_type();
if (__gc_ == 0)
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
this->setstate(__err);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -1128,40 +1148,35 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
sentry __sen(*this, true);
if (__sen)
{
ios_base::iostate __err = ios_base::goodbit;
if (__n == numeric_limits<streamsize>::max())
streamsize __c = 0;
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
if (__n != numeric_limits<streamsize>::max())
{
while (true)
for (; __n > 0 && __i != __eof; --__n)
{
typename traits_type::int_type __i = this->rdbuf()->sbumpc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__err |= ios_base::eofbit;
break;
}
++__gc_;
char_type __ch = traits_type::to_char_type(__i);
char_type __ch = *__i;
++__i;
++__c;
if (traits_type::eq(__ch, __dlm))
break;
}
}
else
{
while (__gc_ < __n)
while (__i != __eof)
{
typename traits_type::int_type __i = this->rdbuf()->sbumpc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__err |= ios_base::eofbit;
break;
}
++__gc_;
char_type __ch = traits_type::to_char_type(__i);
char_type __ch = *__i;
++__i;
++__c;
if (traits_type::eq(__ch, __dlm))
break;
}
}
this->setstate(__err);
if (__i == __eof)
this->setstate(ios_base::eofbit);
__gc_ = __c;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -1208,17 +1223,20 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
sentry __sen(*this, true);
if (__sen)
{
ios_base::iostate __err = ios_base::goodbit;
for (; __gc_ < __n; ++__gc_)
streamsize __c = 0;
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
for (; __i != __eof && __n > 0; ++__i, ++__s, ++__c, --__n)
*__s = *__i;
if (__i == __eof)
{
typename traits_type::int_type __i = this->rdbuf()->sbumpc();
if (traits_type::eq_int_type(__i, traits_type::eof()))
{
this->setstate(ios_base::failbit | ios_base::eofbit);
break;
}
*__s++ = traits_type::to_char_type(__i);
ios_base::iostate __err = ios_base::eofbit;
if (__n > 0)
__err |= ios_base::failbit;
this->setstate(__err);
}
__gc_ = __c;
}
else
this->setstate(ios_base::failbit);
@@ -1236,19 +1254,45 @@ template<class _CharT, class _Traits>
streamsize
basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
{
streamsize __c = this->rdbuf()->in_avail();
__gc_ = 0;
streamsize __c = 0;
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
sentry __sen(*this, true);
if (__sen)
{
typedef istreambuf_iterator<char_type, traits_type> _I;
_I __i(*this);
_I __eof;
__c = this->rdbuf()->in_avail();
switch (__c)
{
case -1:
this->setstate(ios_base::eofbit);
__i = __eof;
break;
case 0:
break;
default:
read(__s, _VSTD::min(__c, __n));
break;
__c = _VSTD::min(__c, __n);
for (streamsize __k = 0; __k < __c; ++__k, ++__s, ++__i)
*__s = *__i;
}
return __gc_;
if (__i == __eof)
this->setstate(ios_base::eofbit);
__gc_ = __c;
}
else
this->setstate(ios_base::failbit);
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
this->__set_badbit_and_consider_rethrow();
}
#endif // _LIBCPP_NO_EXCEPTIONS
return __c;
}
template<class _CharT, class _Traits>
@@ -1411,19 +1455,15 @@ ws(basic_istream<_CharT, _Traits>& __is)
typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
if (__sen)
{
typedef istreambuf_iterator<_CharT, _Traits> _I;
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
while (true)
{
typename _Traits::int_type __i = __is.rdbuf()->sgetc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
{
__is.setstate(ios_base::eofbit);
_I __i(__is);
_I __eof;
for (; __i != __eof; ++__i)
if (!__ct.is(__ct.space, *__i))
break;
}
if (!__ct.is(__ct.space, _Traits::to_char_type(__i)))
break;
__is.rdbuf()->sbumpc();
}
if (__i == __eof)
__is.setstate(ios_base::failbit | ios_base::eofbit);
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -1532,30 +1572,27 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
if (__sen)
{
__str.clear();
typedef istreambuf_iterator<_CharT, _Traits> _I;
streamsize __n = __is.width();
if (__n <= 0)
if (__n == 0)
__n = __str.max_size();
if (__n <= 0)
if (__n < 0)
__n = numeric_limits<streamsize>::max();
streamsize __c = 0;
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
ios_base::iostate __err = ios_base::goodbit;
while (__c < __n)
_I __i(__is);
_I __eof;
for (; __i != __eof && __c < __n; ++__i, ++__c)
{
typename _Traits::int_type __i = __is.rdbuf()->sgetc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
{
__err |= ios_base::eofbit;
break;
}
_CharT __ch = _Traits::to_char_type(__i);
_CharT __ch = *__i;
if (__ct.is(__ct.space, __ch))
break;
__str.push_back(__ch);
++__c;
__is.rdbuf()->sbumpc();
}
__is.width(0);
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
__is.setstate(__err);
@@ -1585,28 +1622,31 @@ getline(basic_istream<_CharT, _Traits>& __is,
if (__sen)
{
__str.clear();
ios_base::iostate __err = ios_base::goodbit;
streamsize __extr = 0;
while (true)
streamsize __c = 0;
typedef istreambuf_iterator<_CharT, _Traits> _I;
_I __i(__is);
_I __eof;
streamsize __n = __str.max_size();
if (__n < 0)
__n = numeric_limits<streamsize>::max();
for (; __i != __eof;)
{
typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
{
__err |= ios_base::eofbit;
break;
}
++__extr;
_CharT __ch = _Traits::to_char_type(__i);
_CharT __ch = *__i;
++__i;
++__c;
if (_Traits::eq(__ch, __dlm))
break;
__str.push_back(__ch);
if (__str.size() == __str.max_size())
if (__c == __n)
{
__err |= ios_base::failbit;
__is.setstate(ios_base::failbit);
break;
}
__str.push_back(__ch);
}
if (__extr == 0)
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
__is.setstate(__err);
}
@@ -1664,26 +1704,24 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
{
basic_string<_CharT, _Traits> __str;
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
typedef istreambuf_iterator<_CharT, _Traits> _I;
streamsize __c = 0;
ios_base::iostate __err = ios_base::goodbit;
_CharT __zero = __ct.widen('0');
_CharT __one = __ct.widen('1');
while (__c < _Size)
_I __i(__is);
_I __eof;
for (; __i != __eof && __c < _Size; ++__i, ++__c)
{
typename _Traits::int_type __i = __is.rdbuf()->sgetc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
{
__err |= ios_base::eofbit;
break;
}
_CharT __ch = _Traits::to_char_type(__i);
if (!_Traits::eq(__ch, __zero) && !_Traits::eq(__ch, __one))
_CharT __ch = *__i;
if (__ch != __zero && __ch != __one)
break;
__str.push_back(__ch);
++__c;
__is.rdbuf()->sbumpc();
}
__is.width(0);
__x = bitset<_Size>(__str);
ios_base::iostate __err = ios_base::goodbit;
if (__i == __eof)
__err |= ios_base::eofbit;
if (__c == 0)
__err |= ios_base::failbit;
__is.setstate(__err);

View File

@@ -1035,7 +1035,7 @@ operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter>
__wrap_iter<_Iter>
operator+(typename __wrap_iter<_Iter>::difference_type, __wrap_iter<_Iter>) _NOEXCEPT;
operator+(typename __wrap_iter<_Iter>::difference_type, const __wrap_iter<_Iter>&) _NOEXCEPT;
template <class _I, class _O> _O copy(_I, _I, _O);
template <class _B1, class _B2> _B2 copy_backward(_B1, _B1, _B2);
@@ -1063,108 +1063,33 @@ public:
private:
iterator_type __i;
public:
_LIBCPP_INLINE_VISIBILITY __wrap_iter() _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_i(this);
#endif
}
_LIBCPP_INLINE_VISIBILITY __wrap_iter() _NOEXCEPT {}
template <class _Up> _LIBCPP_INLINE_VISIBILITY __wrap_iter(const __wrap_iter<_Up>& __u,
typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = 0) _NOEXCEPT
: __i(__u.base())
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__iterator_copy(this, &__u);
#endif
}
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_INLINE_VISIBILITY
__wrap_iter(const __wrap_iter& __x)
: __i(__x.base())
{
__get_db()->__iterator_copy(this, &__x);
}
_LIBCPP_INLINE_VISIBILITY
__wrap_iter& operator=(const __wrap_iter& __x)
{
if (this != &__x)
{
__get_db()->__iterator_copy(this, &__x);
__i = __x.__i;
}
return *this;
}
_LIBCPP_INLINE_VISIBILITY
~__wrap_iter()
{
__get_db()->__erase_i(this);
}
#endif
_LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to dereference a non-dereferenceable iterator");
#endif
return *__i;
}
: __i(__u.base()) {}
_LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT {return *__i;}
_LIBCPP_INLINE_VISIBILITY pointer operator->() const _NOEXCEPT {return &(operator*());}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator++() _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to increment non-incrementable iterator");
#endif
++__i;
return *this;
}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator++() _NOEXCEPT {++__i; return *this;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter operator++(int) _NOEXCEPT
{__wrap_iter __tmp(*this); ++(*this); return __tmp;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator--() _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__decrementable(this),
"Attempted to decrement non-decrementable iterator");
#endif
--__i;
return *this;
}
{__wrap_iter __tmp(*this); ++__i; return __tmp;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator--() _NOEXCEPT {--__i; return *this;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter operator--(int) _NOEXCEPT
{__wrap_iter __tmp(*this); --(*this); return __tmp;}
{__wrap_iter __tmp(*this); --__i; return __tmp;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter operator+ (difference_type __n) const _NOEXCEPT
{__wrap_iter __w(*this); __w += __n; return __w;}
{return __wrap_iter(__i + __n);}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__addable(this, __n),
"Attempted to add/subtract iterator outside of valid range");
#endif
__i += __n;
return *this;
}
{__i += __n; return *this;}
_LIBCPP_INLINE_VISIBILITY __wrap_iter operator- (difference_type __n) const _NOEXCEPT
{return *this + (-__n);}
{return __wrap_iter(__i - __n);}
_LIBCPP_INLINE_VISIBILITY __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
{*this += -__n; return *this;}
{__i -= __n; return *this;}
_LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__subscriptable(this, __n),
"Attempted to subscript iterator outside of valid range");
#endif
return __i[__n];
}
{return __i[__n];}
_LIBCPP_INLINE_VISIBILITY iterator_type base() const _NOEXCEPT {return __i;}
private:
_LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_INLINE_VISIBILITY __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
{
__get_db()->__insert_ic(this, __p);
}
#endif
template <class _Up> friend class __wrap_iter;
template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
@@ -1208,7 +1133,7 @@ private:
template <class _Iter1>
friend
__wrap_iter<_Iter1>
operator+(typename __wrap_iter<_Iter1>::difference_type, __wrap_iter<_Iter1>) _NOEXCEPT;
operator+(typename __wrap_iter<_Iter1>::difference_type, const __wrap_iter<_Iter1>&) _NOEXCEPT;
template <class _I, class _O> friend _O copy(_I, _I, _O);
template <class _B1, class _B2> friend _B2 copy_backward(_B1, _B1, _B2);
@@ -1230,10 +1155,6 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__comparable(&__x, &__y),
"Attempted to compare incomparable iterators");
#endif
return __x.base() == __y.base();
}
@@ -1242,10 +1163,6 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__comparable(&__x, &__y),
"Attempted to compare incomparable iterators");
#endif
return __x.base() < __y.base();
}
@@ -1254,7 +1171,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return !(__x == __y);
return __x.base() != __y.base();
}
template <class _Iter1, class _Iter2>
@@ -1262,7 +1179,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __y < __x;
return __x.base() > __y.base();
}
template <class _Iter1, class _Iter2>
@@ -1270,7 +1187,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return !(__x < __y);
return __x.base() >= __y.base();
}
template <class _Iter1, class _Iter2>
@@ -1278,7 +1195,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return !(__y < __x);
return __x.base() <= __y.base();
}
template <class _Iter1, class _Iter2>
@@ -1286,10 +1203,6 @@ inline _LIBCPP_INLINE_VISIBILITY
typename __wrap_iter<_Iter1>::difference_type
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__comparable(&__x, &__y),
"Attempted to subtract incompatible iterators");
#endif
return __x.base() - __y.base();
}
@@ -1297,10 +1210,9 @@ template <class _Iter>
inline _LIBCPP_INLINE_VISIBILITY
__wrap_iter<_Iter>
operator+(typename __wrap_iter<_Iter>::difference_type __n,
__wrap_iter<_Iter> __x) _NOEXCEPT
const __wrap_iter<_Iter>& __x) _NOEXCEPT
{
__x += __n;
return __x;
return __wrap_iter<_Iter>(__x.base() + __n);
}
#ifdef _LIBCPP_DEBUG

File diff suppressed because it is too large Load Diff

View File

@@ -186,23 +186,15 @@ template <class charT> class messages_byname;
#endif
#include <cstdlib>
#include <ctime>
#if _WIN32
#include <support/win32/locale_win32.h>
#else // _WIN32
#include <nl_types.h>
#endif // !_WIN32
#pragma GCC system_header
_LIBCPP_BEGIN_NAMESPACE_STD
#if __APPLE__ || __FreeBSD__
# define _LIBCPP_GET_C_LOCALE 0
#else
# define _LIBCPP_GET_C_LOCALE __cloc()
#ifndef _LIBCPP_STABLE_APPLE_ABI
// Get the C locale object
locale_t __cloc();
#define __cloc_defined
#endif
typedef _VSTD::remove_pointer<locale_t>::type __locale_struct;
@@ -212,7 +204,7 @@ typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii;
// OSX has nice foo_l() functions that let you turn off use of the global
// locale. Linux, not so much. The following functions avoid the locale when
// that's possible and otherwise do the wrong thing. FIXME.
#ifdef __linux__
#ifndef _LIBCPP_STABLE_APPLE_ABI
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
decltype(MB_CUR_MAX_L(_VSTD::declval<locale_t>()))
@@ -233,7 +225,7 @@ decltype(MB_CUR_MAX) __mb_cur_max_l(locale_t __l)
_LIBCPP_ALWAYS_INLINE inline
wint_t __btowc_l(int __c, locale_t __l)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
return btowc_l(__c, __l);
#else
__locale_raii __current(uselocale(__l), uselocale);
@@ -280,7 +272,7 @@ size_t __mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
size_t __len, mbstate_t *__ps, locale_t __l)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
return mbsnrtowcs_l(__dest, __src, __nms, __len, __ps, __l);
return mbsnrtowcs_l(__dest, __src, __nms__len, __ps, __l);
#else
__locale_raii __current(uselocale(__l), uselocale);
return mbsnrtowcs(__dest, __src, __nms, __len, __ps);
@@ -303,7 +295,7 @@ _LIBCPP_ALWAYS_INLINE inline
int __mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
return mbtowc_l(__pwc, __pmb, __max, __l);
return mbtowc(__pwc, __pmb, __max, __l);
#else
__locale_raii __current(uselocale(__l), uselocale);
return mbtowc(__pwc, __pmb, __max);
@@ -400,7 +392,7 @@ int __sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
return __res;
}
#endif // __linux__
#endif // _LIBCPP_STABLE_APPLE_ABI
// __scan_keyword
// Scans [__b, __e) until a match is found in the basic_strings range
@@ -814,7 +806,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
int __save_errno = errno;
errno = 0;
char *__p2;
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
#ifdef _LIBCPP_STABLE_APPLE_ABI
long long __ll = strtoll_l(__a, &__p2, __base, 0);
#else
long long __ll = strtoll_l(__a, &__p2, __base, __cloc());
#endif
int __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
@@ -854,7 +850,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
int __save_errno = errno;
errno = 0;
char *__p2;
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
#ifdef _LIBCPP_STABLE_APPLE_ABI
unsigned long long __ll = strtoull_l(__a, &__p2, __base, 0);
#else
unsigned long long __ll = strtoull_l(__a, &__p2, __base, __cloc());
#endif
int __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
@@ -882,7 +882,11 @@ __num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
if (__a != __a_end)
{
char *__p2;
long double __ld = strtold_l(__a, &__p2, _LIBCPP_GET_C_LOCALE);
#ifdef _LIBCPP_STABLE_APPLE_ABI
long double __ld = strtold_l(__a, &__p2, 0);
#else
long double __ld = strtold_l(__a, &__p2, __cloc());
#endif
if (__p2 != __a_end)
{
__err = ios_base::failbit;
@@ -1287,8 +1291,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
break;
// Stage 3
__a[sizeof(__a)-1] = 0;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
if (sscanf_l(__a, _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
#ifdef _LIBCPP_STABLE_APPLE_ABI
if (sscanf_l(__a, 0, "%p", &__v) != 1)
#else
if (__sscanf_l(__a, __cloc(), "%p", &__v) != 1)
#endif
@@ -1396,13 +1400,21 @@ __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne,
*__oe++ = __ct.widen(*__nf++);
*__oe++ = __ct.widen(*__nf++);
for (__ns = __nf; __ns < __ne; ++__ns)
if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
#ifdef _LIBCPP_STABLE_APPLE_ABI
if (!isxdigit_l(*__ns, 0))
#else
if (!isxdigit_l(*__ns, __cloc()))
#endif
break;
}
else
{
for (__ns = __nf; __ns < __ne; ++__ns)
if (!isdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
#ifdef _LIBCPP_STABLE_APPLE_ABI
if (!isdigit_l(*__ns, 0))
#else
if (!isdigit_l(*__ns, __cloc()))
#endif
break;
}
if (__grouping.empty())
@@ -1600,8 +1612,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
+ ((numeric_limits<long>::digits % 3) != 0)
+ 1;
char __nar[__nbuf];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
int __nc = sprintf_l(__nar, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
int __nc = sprintf_l(__nar, 0, __fmt, __v);
#else
int __nc = __sprintf_l(__nar, __cloc(), __fmt, __v);
#endif
@@ -1630,8 +1642,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
+ ((numeric_limits<long long>::digits % 3) != 0)
+ 1;
char __nar[__nbuf];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
int __nc = sprintf_l(__nar, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
int __nc = sprintf_l(__nar, 0, __fmt, __v);
#else
int __nc = __sprintf_l(__nar, __cloc(), __fmt, __v);
#endif
@@ -1660,8 +1672,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
+ ((numeric_limits<unsigned long>::digits % 3) != 0)
+ 1;
char __nar[__nbuf];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
int __nc = sprintf_l(__nar, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
int __nc = sprintf_l(__nar, 0, __fmt, __v);
#else
int __nc = __sprintf_l(__nar, __cloc(), __fmt, __v);
#endif
@@ -1690,8 +1702,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
+ ((numeric_limits<unsigned long long>::digits % 3) != 0)
+ 1;
char __nar[__nbuf];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
int __nc = sprintf_l(__nar, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
int __nc = sprintf_l(__nar, 0, __fmt, __v);
#else
int __nc = __sprintf_l(__nar, __cloc(), __fmt, __v);
#endif
@@ -1721,16 +1733,16 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
char* __nb = __nar;
int __nc;
if (__specify_precision)
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt,
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = snprintf_l(__nb, __nbuf, 0, __fmt,
(int)__iob.precision(), __v);
#else
__nc = __snprintf_l(__nb, __nbuf, __cloc(), __fmt,
(int)__iob.precision(), __v);
#endif
else
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = snprintf_l(__nb, __nbuf, 0, __fmt, __v);
#else
__nc = __snprintf_l(__nb, __nbuf, __cloc(), __fmt, __v);
#endif
@@ -1738,17 +1750,17 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
if (__nc > static_cast<int>(__nbuf-1))
{
if (__specify_precision)
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = asprintf_l(&__nb, 0, __fmt, (int)__iob.precision(), __v);
#else
__nc = __asprintf_l(&__nb, __cloc(), __fmt,
(int)__iob.precision(), __v);
(int)__iob.precision());
#endif
else
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = asprintf_l(&__nb, 0, __fmt, __v);
#else
__nc = __asprintf_l(&__nb, __cloc(), __fmt, (int)__iob.precision(), __v);
__nc = __asprintf_l(&__nb, __cloc(), __fmt, (int)__iob.precision());
#endif
if (__nb == 0)
__throw_bad_alloc();
@@ -1790,16 +1802,16 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
char* __nb = __nar;
int __nc;
if (__specify_precision)
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt,
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = snprintf_l(__nb, __nbuf, 0, __fmt,
(int)__iob.precision(), __v);
#else
__nc = __snprintf_l(__nb, __nbuf, __cloc(), __fmt,
(int)__iob.precision(), __v);
#endif
else
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = snprintf_l(__nb, __nbuf, 0, __fmt, __v);
#else
__nc = __snprintf_l(__nb, __nbuf, __cloc(), __fmt, __v);
#endif
@@ -1807,17 +1819,17 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
if (__nc > static_cast<int>(__nbuf-1))
{
if (__specify_precision)
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = asprintf_l(&__nb, 0, __fmt, (int)__iob.precision(), __v);
#else
__nc = __asprintf_l(&__nb, __cloc(), __fmt,
(int)__iob.precision(), __v);
(int)__iob.precision());
#endif
else
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__nc = asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__nc = asprintf_l(&__nb, 0, __fmt, __v);
#else
__nc = __asprintf_l(&__nb, __cloc(), __fmt, __v);
__nc = __asprintf_l(&__nb, __cloc(), __fmt, (int)__iob.precision());
#endif
if (__nb == 0)
__throw_bad_alloc();
@@ -1854,8 +1866,8 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
char __fmt[6] = "%p";
const unsigned __nbuf = 20;
char __nar[__nbuf];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
int __nc = sprintf_l(__nar, _LIBCPP_GET_C_LOCALE, __fmt, __v);
#ifdef _LIBCPP_STABLE_APPLE_ABI
int __nc = sprintf_l(__nar, 0, __fmt, __v);
#else
int __nc = __sprintf_l(__nar, __cloc(), __fmt, __v);
#endif
@@ -2635,7 +2647,11 @@ class __time_put
{
locale_t __loc_;
protected:
_LIBCPP_ALWAYS_INLINE __time_put() : __loc_(_LIBCPP_GET_C_LOCALE) {}
#ifdef _LIBCPP_STABLE_APPLE_ABI
_LIBCPP_ALWAYS_INLINE __time_put() : __loc_(0) {}
#else // _LIBCPP_STABLE_APPLE_ABI
_LIBCPP_ALWAYS_INLINE __time_put() : __loc_(__cloc()) {}
#endif // _LIBCPP_STABLE_APPLE_ABI
__time_put(const char* __nm);
__time_put(const string& __nm);
~__time_put();
@@ -3538,8 +3554,8 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl,
// secure memory for digit storage
if (__n > __bs-1)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
__n = asprintf_l(&__bb, _LIBCPP_GET_C_LOCALE, "%.0Lf", __units);
#ifdef _LIBCPP_STABLE_APPLE_ABI
__n = asprintf_l(&__bb, 0, "%.0Lf", __units);
#else
__n = __asprintf_l(&__bb, __cloc(), "%.0Lf", __units);
#endif
@@ -3693,14 +3709,10 @@ template <class _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
{
#if _WIN32
return -1;
#else // _WIN32
catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
catalog __cat = reinterpret_cast<catalog>(catopen(__nm.c_str(), NL_CAT_LOCALE));
if (__cat != -1)
__cat = static_cast<catalog>((static_cast<size_t>(__cat) >> 1));
return __cat;
#endif // _WIN32
}
template <class _CharT>
@@ -3708,34 +3720,28 @@ typename messages<_CharT>::string_type
messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
const string_type& __dflt) const
{
#if _WIN32
return __dflt;
#else // _WIN32
string __ndflt;
__narrow_to_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__ndflt),
__dflt.c_str(),
__dflt.c_str() + __dflt.size());
if (__c != -1)
__c <<= 1;
nl_catd __cat = (nl_catd)__c;
nl_catd __cat = reinterpret_cast<nl_catd>(__c);
char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str());
string_type __w;
__widen_from_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__w),
__n, __n + strlen(__n));
return __w;
#endif // _WIN32
}
template <class _CharT>
void
messages<_CharT>::do_close(catalog __c) const
{
#if !_WIN32
if (__c != -1)
__c <<= 1;
nl_catd __cat = (nl_catd)__c;
nl_catd __cat = reinterpret_cast<nl_catd>(__c);
catclose(__cat);
#endif // !_WIN32
}
extern template class messages<char>;

View File

@@ -773,18 +773,6 @@ public:
map(map&& __m, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
map& operator=(map&& __m)
_NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
{
__tree_ = _VSTD::move(__m.__tree_);
return *this;
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
map(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: __tree_(__vc(__comp))
@@ -799,6 +787,14 @@ public:
insert(__il.begin(), __il.end());
}
_LIBCPP_INLINE_VISIBILITY
map& operator=(map&& __m)
_NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
{
__tree_ = _VSTD::move(__m.__tree_);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
map& operator=(initializer_list<value_type> __il)
{
@@ -806,7 +802,7 @@ public:
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
explicit map(const allocator_type& __a)
@@ -947,14 +943,10 @@ public:
insert(__e.__i_, *__f);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
_LIBCPP_INLINE_VISIBILITY
@@ -1530,18 +1522,6 @@ public:
multimap(multimap&& __m, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
multimap& operator=(multimap&& __m)
_NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
{
__tree_ = _VSTD::move(__m.__tree_);
return *this;
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: __tree_(__vc(__comp))
@@ -1556,14 +1536,21 @@ public:
insert(__il.begin(), __il.end());
}
_LIBCPP_INLINE_VISIBILITY
multimap& operator=(multimap&& __m)
_NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
{
__tree_ = _VSTD::move(__m.__tree_);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
multimap& operator=(initializer_list<value_type> __il)
{
__tree_.__assign_multi(__il.begin(), __il.end());
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
explicit multimap(const allocator_type& __a)
@@ -1692,14 +1679,10 @@ public:
__tree_.__insert_multi(__e.__i_, *__f);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
_LIBCPP_INLINE_VISIBILITY

View File

@@ -2903,7 +2903,9 @@ public:
long use_count() const _NOEXCEPT {return __shared_count::use_count();}
__shared_weak_count* lock() _NOEXCEPT;
#ifndef _LIBCPP_NO_RTTI
virtual const void* __get_deleter(const type_info&) const _NOEXCEPT;
#endif
private:
virtual void __on_zero_shared_weak() _NOEXCEPT = 0;
};

View File

@@ -2562,11 +2562,8 @@ subtract_with_carry_engine<_UIntType, __w, __s, __r>::seed(result_type __sd,
linear_congruential_engine<result_type, 40014u, 0u, 2147483563u>
__e(__sd == 0u ? default_seed : __sd);
for (size_t __i = 0; __i < __r; ++__i)
{
result_type __e0 = __e();
__x_[__i] = static_cast<result_type>(
(__e0 + ((uint64_t)__e() << 32)) & _Max);
}
(__e() + ((uint64_t)__e() << 32)) & _Max);
__c_ = __x_[__r-1] == 0;
__i_ = 0;
}
@@ -3402,11 +3399,9 @@ public:
// constructors
_LIBCPP_INLINE_VISIBILITY
seed_seq() {}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _Tp>
_LIBCPP_INLINE_VISIBILITY
seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _InputIterator>
_LIBCPP_INLINE_VISIBILITY
@@ -5720,11 +5715,9 @@ public:
_LIBCPP_INLINE_VISIBILITY
param_type(_InputIterator __f, _InputIterator __l)
: __p_(__f, __l) {__init();}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
param_type(initializer_list<double> __wl)
: __p_(__wl.begin(), __wl.end()) {__init();}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
param_type(size_t __nw, double __xmin, double __xmax,
_UnaryOperation __fw);
@@ -5767,11 +5760,9 @@ public:
_LIBCPP_INLINE_VISIBILITY
discrete_distribution(_InputIterator __f, _InputIterator __l)
: __p_(__f, __l) {}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
discrete_distribution(initializer_list<double> __wl)
: __p_(__wl) {}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
_LIBCPP_INLINE_VISIBILITY
discrete_distribution(size_t __nw, double __xmin, double __xmax,
@@ -5951,10 +5942,8 @@ public:
template<class _InputIteratorB, class _InputIteratorW>
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
_InputIteratorW __fW);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
param_type(size_t __nw, result_type __xmin, result_type __xmax,
_UnaryOperation __fw);
@@ -6004,13 +5993,11 @@ public:
_InputIteratorW __fW)
: __p_(__fB, __lB, __fW) {}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
_LIBCPP_INLINE_VISIBILITY
piecewise_constant_distribution(initializer_list<result_type> __bl,
_UnaryOperation __fw)
: __p_(__bl, __fw) {}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
_LIBCPP_INLINE_VISIBILITY
@@ -6140,8 +6127,6 @@ piecewise_constant_distribution<_RealType>::param_type::param_type(
}
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _RealType>
template<class _UnaryOperation>
piecewise_constant_distribution<_RealType>::param_type::param_type(
@@ -6165,8 +6150,6 @@ piecewise_constant_distribution<_RealType>::param_type::param_type(
}
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _RealType>
template<class _UnaryOperation>
piecewise_constant_distribution<_RealType>::param_type::param_type(
@@ -6275,10 +6258,8 @@ public:
template<class _InputIteratorB, class _InputIteratorW>
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
_InputIteratorW __fW);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
param_type(size_t __nw, result_type __xmin, result_type __xmax,
_UnaryOperation __fw);
@@ -6328,13 +6309,11 @@ public:
_InputIteratorW __fW)
: __p_(__fB, __lB, __fW) {}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
_LIBCPP_INLINE_VISIBILITY
piecewise_linear_distribution(initializer_list<result_type> __bl,
_UnaryOperation __fw)
: __p_(__bl, __fw) {}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _UnaryOperation>
_LIBCPP_INLINE_VISIBILITY
@@ -6468,8 +6447,6 @@ piecewise_linear_distribution<_RealType>::param_type::param_type(
}
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _RealType>
template<class _UnaryOperation>
piecewise_linear_distribution<_RealType>::param_type::param_type(
@@ -6493,8 +6470,6 @@ piecewise_linear_distribution<_RealType>::param_type::param_type(
}
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _RealType>
template<class _UnaryOperation>
piecewise_linear_distribution<_RealType>::param_type::param_type(

View File

@@ -2478,14 +2478,12 @@ public:
: __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
__end_(0)
{__parse(__first, __last);}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_regex(initializer_list<value_type> __il,
flag_type __f = regex_constants::ECMAScript)
: __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
__end_(0)
{__parse(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~basic_regex() = default;
@@ -2494,11 +2492,9 @@ public:
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(const value_type* __p)
{return assign(__p);}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(initializer_list<value_type> __il)
{return assign(__il);}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _ST, class _SA>
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(const basic_string<value_type, _ST, _SA>& __p)
@@ -2561,15 +2557,11 @@ public:
__parse(__first, __last);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_regex& assign(initializer_list<value_type> __il,
flag_type __f = regex_constants::ECMAScript)
{return assign(__il.begin(), __il.end(), __f);}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// const operations:
_LIBCPP_INLINE_VISIBILITY
unsigned mark_count() const {return __marked_count_;}
@@ -5210,11 +5202,11 @@ public:
const_reference suffix() const {return __suffix_;}
_LIBCPP_INLINE_VISIBILITY
const_iterator begin() const {return empty() ? __matches_.end() : __matches_.begin();}
const_iterator begin() const {return empty() ? __matches_.end() : __matches_.begin() + 1;}
_LIBCPP_INLINE_VISIBILITY
const_iterator end() const {return __matches_.end();}
_LIBCPP_INLINE_VISIBILITY
const_iterator cbegin() const {return empty() ? __matches_.end() : __matches_.begin();}
const_iterator cbegin() const {return empty() ? __matches_.end() : __matches_.begin() + 1;}
_LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __matches_.end();}
@@ -6077,13 +6069,11 @@ public:
const regex_type& __re, const vector<int>& __submatches,
regex_constants::match_flag_type __m =
regex_constants::match_default);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
const regex_type& __re,
initializer_list<int> __submatches,
regex_constants::match_flag_type __m =
regex_constants::match_default);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <size_t _N>
regex_token_iterator(_BidirectionalIterator __a,
_BidirectionalIterator __b,
@@ -6172,8 +6162,6 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
__init(__a, __b);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _BidirectionalIterator, class _CharT, class _Traits>
regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
@@ -6187,8 +6175,6 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
__init(__a, __b);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _BidirectionalIterator, class _CharT, class _Traits>
template <size_t _N>
regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::

View File

@@ -437,7 +437,6 @@ public:
set(set&& __s, const allocator_type& __a);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
set(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
: __tree_(__comp)
@@ -459,7 +458,6 @@ public:
__tree_.__assign_unique(__il.begin(), __il.end());
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -544,11 +542,9 @@ public:
__tree_.__insert_unique(__e, *__f);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p);}
@@ -775,7 +771,6 @@ public:
multiset(multiset&& __s, const allocator_type& __a);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
multiset(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
: __tree_(__comp)
@@ -797,7 +792,6 @@ public:
__tree_.__assign_multi(__il.begin(), __il.end());
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -882,11 +876,9 @@ public:
__tree_.__insert_multi(__e, *__f);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p);}

View File

@@ -1150,12 +1150,10 @@ public:
template<class _InputIterator>
_LIBCPP_INLINE_VISIBILITY
basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string(initializer_list<value_type> __il);
_LIBCPP_INLINE_VISIBILITY
basic_string(initializer_list<value_type> __il, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
~basic_string();
@@ -1168,10 +1166,8 @@ public:
#endif
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);}
basic_string& operator=(value_type __c);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_DEBUG
_LIBCPP_INLINE_VISIBILITY
@@ -1244,9 +1240,7 @@ public:
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const basic_string& __str) {return append(__str);}
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const_pointer __s) {return append(__s);}
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(value_type __c) {push_back(__c); return *this;}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& append(const basic_string& __str);
@@ -1269,10 +1263,8 @@ public:
basic_string&
>::type
append(_ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void push_back(value_type __c);
_LIBCPP_INLINE_VISIBILITY
@@ -1308,10 +1300,8 @@ public:
basic_string&
>::type
assign(_ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& insert(size_type __pos1, const basic_string& __str);
@@ -1337,11 +1327,9 @@ public:
iterator
>::type
insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __pos, initializer_list<value_type> __il)
{return insert(__pos, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
basic_string& erase(size_type __pos = 0, size_type __n = npos);
_LIBCPP_INLINE_VISIBILITY
@@ -1370,11 +1358,9 @@ public:
basic_string&
>::type
replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il)
{return replace(__i1, __i2, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
size_type copy(pointer __s, size_type __n, size_type __pos = 0) const;
_LIBCPP_INLINE_VISIBILITY
@@ -1593,7 +1579,7 @@ private:
_LIBCPP_INLINE_VISIBILITY
void
__move_assign_alloc(basic_string& __str)
__move_assign_alloc(const basic_string& __str)
_NOEXCEPT_(
!__alloc_traits::propagate_on_container_move_assignment::value ||
is_nothrow_move_assignable<allocator_type>::value)
@@ -1601,14 +1587,14 @@ private:
__alloc_traits::propagate_on_container_move_assignment::value>());}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(basic_string& __c, true_type)
void __move_assign_alloc(const basic_string& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(basic_string& __c, false_type)
void __move_assign_alloc(const basic_string& __c, false_type)
_NOEXCEPT
{}
@@ -1977,8 +1963,6 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first,
__init(__first, __last);
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_type> __il)
@@ -1994,8 +1978,6 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_t
__init(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>::~basic_string()
{
@@ -3897,21 +3879,6 @@ template<class _CharT, class _Traits, class _Allocator>
const typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::npos;
template<class _Ptr>
size_t _LIBCPP_INLINE_VISIBILITY __do_string_hash(_Ptr __p, _Ptr __e)
{
size_t __r = 0;
const size_t __sr = __CHAR_BIT__ * sizeof(size_t) - 8;
const size_t __m = size_t(0xF) << (__sr + 4);
for (; __p != __e; ++__p)
{
__r = (__r << 4) + *__p;
size_t __g = __r & __m;
__r ^= __g | (__g >> __sr);
}
return __r;
}
template<class _CharT, class _Traits, class _Allocator>
struct _LIBCPP_VISIBLE hash<basic_string<_CharT, _Traits, _Allocator> >
: public unary_function<basic_string<_CharT, _Traits, _Allocator>, size_t>
@@ -3925,7 +3892,20 @@ size_t
hash<basic_string<_CharT, _Traits, _Allocator> >::operator()(
const basic_string<_CharT, _Traits, _Allocator>& __val) const _NOEXCEPT
{
return __do_string_hash(__val.data(), __val.data() + __val.size());
typedef basic_string<_CharT, _Traits, _Allocator> S;
typedef typename S::const_pointer const_pointer;
size_t __r = 0;
const size_t __sr = __CHAR_BIT__ * sizeof(size_t) - 8;
const size_t __m = size_t(0xF) << (__sr + 4);
const_pointer __p = __val.data();
const_pointer __e = __p + __val.size();
for (; __p != __e; ++__p)
{
__r = (__r << 4) + *__p;
size_t __g = __r & __m;
__r ^= __g | (__g >> __sr);
}
return __r;
}
template<class _CharT, class _Traits, class _Allocator>

View File

@@ -1,31 +0,0 @@
// -*- C++ -*-
//===----------------------- support/win32/support.h ----------------------===//
//
// 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_SUPPORT_WIN32_SUPPORT_H
#define _LIBCPP_SUPPORT_WIN32_SUPPORT_H
/*
Functions and constants used in libc++ that are missing from the Windows C library.
*/
#include <wchar.h> // mbstate_t
#include <stdio.h> // _snwprintf
#define swprintf _snwprintf
#define vswprintf _vsnwprintf
int vasprintf( char **sptr, const char *__restrict__ fmt , va_list ap );
int asprintf(char **sptr, const char *__restrict__ fmt, ...);
size_t mbsnrtowcs( wchar_t *__restrict__ dst, const char **__restrict__ src,
size_t nmc, size_t len, mbstate_t *__restrict__ ps );
size_t wcsnrtombs( char *__restrict__ dst, const wchar_t **__restrict__ src,
size_t nwc, size_t len, mbstate_t *__restrict__ ps );
#endif // _LIBCPP_SUPPORT_WIN32_SUPPORT_H

View File

@@ -639,6 +639,11 @@ tie(_Tp&... __t)
template <class _Up>
struct __ignore_t
{
_LIBCPP_INLINE_VISIBILITY
__ignore_t() {}
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
__ignore_t(_Tp&&) {}
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
const __ignore_t& operator=(_Tp&&) const {return *this;}

View File

@@ -725,7 +725,7 @@ template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
// is_base_of
#ifdef _LIBCP_HAS_IS_BASE_OF
#if __has_feature(is_base_of)
template <class _Bp, class _Dp>
struct _LIBCPP_VISIBLE is_base_of
@@ -733,7 +733,51 @@ struct _LIBCPP_VISIBLE is_base_of
#else // __has_feature(is_base_of)
#error is_base_of not implemented.
// (C) Copyright Rani Sharoni 2003.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
template <class _Bp, class _Dp>
struct __is_base_of_tests
{
template <class _Tp>
static char __test(const volatile _Dp*, _Tp);
static __two __test(const volatile _Bp*, int);
};
template <class _Bp, class _Dp>
struct __is_base_of_imp
{
struct __host
{
operator const volatile _Bp*() const;
operator const volatile _Dp*();
};
static const size_t __complete_check = sizeof(_Dp);
static const bool value = sizeof(__is_base_of_tests<_Bp, _Dp>::__test(__host(), 0)) == 1;
};
template <class _Bp, class _Dp, bool = is_class<_Bp>::value,
bool = is_class<_Dp>::value,
bool = is_same<_Bp, _Dp>::value>
struct __libcpp_base_of : public false_type {};
template <class _Bp, class _Dp>
struct __libcpp_base_of<_Bp, _Dp, true, true, true> : public true_type {};
template <class _Bp, class _Dp>
struct __libcpp_base_of<_Bp, _Dp, true, true, false>
: public integral_constant<bool, __is_base_of_imp<_Bp, _Dp>::value> {};
template <class _Bp, class _Dp>
struct _LIBCPP_VISIBLE is_base_of
: public __libcpp_base_of<typename remove_cv<_Bp>::type, typename remove_cv<_Dp>::type>
{
};
#endif // __has_feature(is_base_of)

View File

@@ -684,14 +684,12 @@ public:
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_map(unordered_map&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_map(initializer_list<value_type> __il);
unordered_map(initializer_list<value_type> __il, size_type __n,
const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
unordered_map(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_map() = default;
_LIBCPP_INLINE_VISIBILITY
unordered_map& operator=(const unordered_map& __u)
@@ -703,9 +701,7 @@ public:
unordered_map& operator=(unordered_map&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_map& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -792,11 +788,9 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
@@ -992,8 +986,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
initializer_list<value_type> __il)
@@ -1021,8 +1013,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
insert(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1037,8 +1027,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
@@ -1049,8 +1037,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_VARIADICS
@@ -1306,7 +1292,6 @@ public:
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_multimap(initializer_list<value_type> __il);
unordered_multimap(initializer_list<value_type> __il, size_type __n,
const hasher& __hf = hasher(),
@@ -1314,7 +1299,6 @@ public:
unordered_multimap(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_multimap() = default;
_LIBCPP_INLINE_VISIBILITY
unordered_multimap& operator=(const unordered_multimap& __u)
@@ -1326,9 +1310,7 @@ public:
unordered_multimap& operator=(unordered_multimap&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_multimap& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -1411,11 +1393,9 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
@@ -1602,8 +1582,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
initializer_list<value_type> __il)
@@ -1631,8 +1609,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
insert(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1647,8 +1623,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multima
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
@@ -1659,8 +1633,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_VARIADICS

View File

@@ -365,7 +365,6 @@ public:
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_set(unordered_set&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_set(initializer_list<value_type> __il);
unordered_set(initializer_list<value_type> __il, size_type __n,
const hasher& __hf = hasher(),
@@ -373,7 +372,6 @@ public:
unordered_set(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_set() = default;
_LIBCPP_INLINE_VISIBILITY
unordered_set& operator=(const unordered_set& __u)
@@ -385,9 +383,7 @@ public:
unordered_set& operator=(unordered_set&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_set& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -441,11 +437,9 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p);}
@@ -613,8 +607,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
initializer_list<value_type> __il)
@@ -642,8 +634,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
insert(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -658,8 +648,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_set<_Value, _Hash, _Pred, _Alloc>&
@@ -670,8 +658,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
inline _LIBCPP_INLINE_VISIBILITY
@@ -777,7 +763,6 @@ public:
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_multiset(unordered_multiset&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_multiset(initializer_list<value_type> __il);
unordered_multiset(initializer_list<value_type> __il, size_type __n,
const hasher& __hf = hasher(),
@@ -785,7 +770,6 @@ public:
unordered_multiset(initializer_list<value_type> __il, size_type __n,
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~unordered_multiset() = default;
_LIBCPP_INLINE_VISIBILITY
unordered_multiset& operator=(const unordered_multiset& __u)
@@ -797,9 +781,7 @@ public:
unordered_multiset& operator=(unordered_multiset&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
unordered_multiset& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -851,11 +833,9 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p);}
@@ -1024,8 +1004,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
initializer_list<value_type> __il)
@@ -1053,8 +1031,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
insert(__il.begin(), __il.end());
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -1070,8 +1046,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
inline
unordered_multiset<_Value, _Hash, _Pred, _Alloc>&
@@ -1082,8 +1056,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
inline _LIBCPP_INLINE_VISIBILITY

View File

@@ -798,10 +798,8 @@ public:
valarray(const valarray& __v);
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
valarray(valarray&& __v);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
valarray(initializer_list<value_type> __il);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
valarray(const slice_array<value_type>& __sa);
valarray(const gslice_array<value_type>& __ga);
valarray(const mask_array<value_type>& __ma);
@@ -812,10 +810,8 @@ public:
valarray& operator=(const valarray& __v);
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
valarray& operator=(valarray&& __v);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
valarray& operator=(initializer_list<value_type>);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
valarray& operator=(const value_type& __x);
valarray& operator=(const slice_array<value_type>& __sa);
valarray& operator=(const gslice_array<value_type>& __ga);
@@ -2712,10 +2708,6 @@ valarray<_Tp>::valarray(valarray&& __v)
__v.__begin_ = __v.__end_ = nullptr;
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp>
valarray<_Tp>::valarray(initializer_list<value_type> __il)
: __begin_(0),
@@ -2742,7 +2734,7 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
}
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
@@ -2892,10 +2884,6 @@ valarray<_Tp>::operator=(valarray&& __v)
return *this;
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
@@ -2907,7 +2895,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
return *this;
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY

View File

@@ -160,7 +160,7 @@ public:
vector()
noexcept(is_nothrow_default_constructible<allocator_type>::value);
explicit vector(const allocator_type&);
explicit vector(const allocator_type& = allocator_type());
explicit vector(size_type n, const value_type& value = value_type(), const allocator_type& = allocator_type());
template <class InputIterator>
vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
@@ -269,6 +269,9 @@ void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
#include <cstring>
#include <__split_buffer>
#include <__functional_base>
#if defined(_LIBCPP_DEBUG) || defined(_LIBCPP_NO_EXCEPTIONS)
#include <cassert>
#endif
#pragma GCC system_header
@@ -399,14 +402,14 @@ private:
{}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__vector_base& __c, true_type)
void __move_assign_alloc(const __vector_base& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__vector_base& __c, false_type)
void __move_assign_alloc(const __vector_base& __c, false_type)
_NOEXCEPT
{}
@@ -486,26 +489,32 @@ public:
typedef typename __base::difference_type difference_type;
typedef typename __base::pointer pointer;
typedef typename __base::const_pointer const_pointer;
#ifdef _LIBCPP_DEBUG
typedef __debug_iter<vector, pointer> iterator;
typedef __debug_iter<vector, const_pointer> const_iterator;
friend class __debug_iter<vector, pointer>;
friend class __debug_iter<vector, const_pointer>;
pair<iterator*, const_iterator*> __iterator_list_;
_LIBCPP_INLINE_VISIBILITY iterator*& __get_iterator_list(iterator*) {return __iterator_list_.first;}
_LIBCPP_INLINE_VISIBILITY const_iterator*& __get_iterator_list(const_iterator*) {return __iterator_list_.second;}
#elif defined(_LIBCPP_RAW_ITERATORS)
typedef pointer iterator;
typedef const_pointer const_iterator;
#else // defined(_LIBCPP_RAW_ITERATORS)
typedef __wrap_iter<pointer> iterator;
typedef __wrap_iter<const_pointer> const_iterator;
#endif // defined(_LIBCPP_RAW_ITERATORS)
typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
_LIBCPP_INLINE_VISIBILITY
vector()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
}
_LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
}
{}
_LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a) : __base(__a) {}
explicit vector(size_type __n);
vector(size_type __n, const_reference __x);
vector(size_type __n, const_reference __x, const allocator_type& __a);
@@ -523,18 +532,13 @@ public:
template <class _ForwardIterator>
vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
typename enable_if<__is_forward_iterator<_ForwardIterator>::value>::type* = 0);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
vector(initializer_list<value_type> __il);
_LIBCPP_INLINE_VISIBILITY
vector(initializer_list<value_type> __il, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#if _LIBCPP_DEBUG_LEVEL >= 2
#ifdef _LIBCPP_DEBUG
_LIBCPP_INLINE_VISIBILITY
~vector()
{
__get_db()->__erase_c(this);
}
~vector() {__invalidate_all_iterators();}
#endif
vector(const vector& __x);
@@ -553,11 +557,9 @@ public:
__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _InputIterator>
typename enable_if
@@ -576,11 +578,9 @@ public:
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const_reference __u);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -635,26 +635,10 @@ public:
reference at(size_type __n);
const_reference at(size_type __n) const;
_LIBCPP_INLINE_VISIBILITY reference front()
{
_LIBCPP_ASSERT(!empty(), "front() called for empty vector");
return *this->__begin_;
}
_LIBCPP_INLINE_VISIBILITY const_reference front() const
{
_LIBCPP_ASSERT(!empty(), "front() called for empty vector");
return *this->__begin_;
}
_LIBCPP_INLINE_VISIBILITY reference back()
{
_LIBCPP_ASSERT(!empty(), "back() called for empty vector");
return *(this->__end_ - 1);
}
_LIBCPP_INLINE_VISIBILITY const_reference back() const
{
_LIBCPP_ASSERT(!empty(), "back() called for empty vector");
return *(this->__end_ - 1);
}
_LIBCPP_INLINE_VISIBILITY reference front() {return *this->__begin_;}
_LIBCPP_INLINE_VISIBILITY const_reference front() const {return *this->__begin_;}
_LIBCPP_INLINE_VISIBILITY reference back() {return *(this->__end_ - 1);}
_LIBCPP_INLINE_VISIBILITY const_reference back() const {return *(this->__end_ - 1);}
_LIBCPP_INLINE_VISIBILITY
value_type* data() _NOEXCEPT
@@ -697,21 +681,16 @@ public:
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
iterator erase(const_iterator __first, const_iterator __last);
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
{
__base::clear();
__invalidate_all_iterators();
}
{__base::clear();}
void resize(size_type __sz);
void resize(size_type __sz, const_reference __x);
@@ -722,15 +701,6 @@ public:
bool __invariants() const;
#if _LIBCPP_DEBUG_LEVEL >= 2
bool __dereferenceable(const const_iterator* __i) const;
bool __decrementable(const const_iterator* __i) const;
bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
#endif // _LIBCPP_DEBUG_LEVEL >= 2
private:
_LIBCPP_INLINE_VISIBILITY void __invalidate_all_iterators();
void allocate(size_type __n);
@@ -758,26 +728,6 @@ private:
void __move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
void __move_assign(vector& __c, false_type);
_LIBCPP_INLINE_VISIBILITY
void __destruct_at_end(const_pointer __new_last) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__c_node* __c = __get_db()->__find_c_and_lock(this);
for (__i_node** __p = __c->end_; __p != __c->beg_; )
{
--__p;
const_iterator* __i = static_cast<const_iterator*>((*__p)->__i_);
if (__i->base() > __new_last)
{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
#endif
__base::__destruct_at_end(__new_last);
}
};
template <class _Tp, class _Allocator>
@@ -835,6 +785,7 @@ vector<_Tp, _Allocator>::deallocate() _NOEXCEPT
{
clear();
__alloc_traits::deallocate(this->__alloc(), this->__begin_, capacity());
__invalidate_all_iterators();
this->__begin_ = this->__end_ = this->__end_cap() = 0;
}
}
@@ -843,7 +794,7 @@ template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
{
return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2); // end() >= begin(), always
return _VSTD::min(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2); // end() >= begin(), always
}
// Precondition: __new_size > capacity()
@@ -858,7 +809,7 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
const size_type __cap = capacity();
if (__cap >= __ms / 2)
return __ms;
return _VSTD::max<size_type>(2*__cap, __new_size);
return _VSTD::max(2*__cap, __new_size);
}
// Default constructs __n objects starting at __end_
@@ -970,9 +921,6 @@ vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
template <class _Tp, class _Allocator>
vector<_Tp, _Allocator>::vector(size_type __n)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__n > 0)
{
allocate(__n);
@@ -983,9 +931,6 @@ vector<_Tp, _Allocator>::vector(size_type __n)
template <class _Tp, class _Allocator>
vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__n > 0)
{
allocate(__n);
@@ -997,9 +942,6 @@ template <class _Tp, class _Allocator>
vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x, const allocator_type& __a)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__n > 0)
{
allocate(__n);
@@ -1013,9 +955,6 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
typename enable_if<__is_input_iterator <_InputIterator>::value &&
!__is_forward_iterator<_InputIterator>::value>::type*)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
for (; __first != __last; ++__first)
push_back(*__first);
}
@@ -1027,9 +966,6 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, c
!__is_forward_iterator<_InputIterator>::value>::type*)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
for (; __first != __last; ++__first)
push_back(*__first);
}
@@ -1039,9 +975,6 @@ template <class _ForwardIterator>
vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last,
typename enable_if<__is_forward_iterator<_ForwardIterator>::value>::type*)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
@@ -1056,9 +989,6 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
typename enable_if<__is_forward_iterator<_ForwardIterator>::value>::type*)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
@@ -1071,9 +1001,6 @@ template <class _Tp, class _Allocator>
vector<_Tp, _Allocator>::vector(const vector& __x)
: __base(__alloc_traits::select_on_container_copy_construction(__x.__alloc()))
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
size_type __n = __x.size();
if (__n > 0)
{
@@ -1086,9 +1013,6 @@ template <class _Tp, class _Allocator>
vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
size_type __n = __x.size();
if (__n > 0)
{
@@ -1105,14 +1029,11 @@ vector<_Tp, _Allocator>::vector(vector&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
: __base(_VSTD::move(__x.__alloc()))
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
__get_db()->swap(this, &__x);
#endif
this->__begin_ = __x.__begin_;
this->__end_ = __x.__end_;
this->__end_cap() = __x.__end_cap();
__x.__begin_ = __x.__end_ = __x.__end_cap() = 0;
__x.__invalidate_all_iterators();
}
template <class _Tp, class _Allocator>
@@ -1120,18 +1041,13 @@ _LIBCPP_INLINE_VISIBILITY inline
vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__a == __x.__alloc())
{
this->__begin_ = __x.__begin_;
this->__end_ = __x.__end_;
this->__end_cap() = __x.__end_cap();
__x.__begin_ = __x.__end_ = __x.__end_cap() = nullptr;
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->swap(this, &__x);
#endif
__x.__invalidate_all_iterators();
}
else
{
@@ -1140,15 +1056,10 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a)
}
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__il.size() > 0)
{
allocate(__il.size());
@@ -1161,9 +1072,6 @@ _LIBCPP_INLINE_VISIBILITY inline
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
: __base(__a)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_c(this);
#endif
if (__il.size() > 0)
{
allocate(__il.size());
@@ -1171,8 +1079,6 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
}
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
vector<_Tp, _Allocator>&
@@ -1210,9 +1116,6 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
this->__end_cap() = __c.__end_cap();
__base::__move_assign_alloc(__c);
__c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->swap(this, &__c);
#endif
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -1305,7 +1208,7 @@ _LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
#ifdef _LIBCPP_DEBUG
return iterator(this, __p);
#else
return iterator(__p);
@@ -1317,7 +1220,7 @@ _LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
#ifdef _LIBCPP_DEBUG
return const_iterator(this, __p);
#else
return const_iterator(__p);
@@ -1361,7 +1264,9 @@ _LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::operator[](size_type __n)
{
_LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
#ifdef _LIBCPP_DEBUG
assert(__n < size());
#endif
return this->__begin_[__n];
}
@@ -1370,7 +1275,9 @@ _LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::operator[](size_type __n) const
{
_LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
#ifdef _LIBCPP_DEBUG
assert(__n < size());
#endif
return this->__begin_[__n];
}
@@ -1498,7 +1405,6 @@ _LIBCPP_INLINE_VISIBILITY inline
void
vector<_Tp, _Allocator>::pop_back()
{
_LIBCPP_ASSERT(!empty(), "vector::pop_back called for empty vector");
this->__destruct_at_end(this->__end_ - 1);
}
@@ -1507,11 +1413,6 @@ _LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __position)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::erase(iterator) called with an iterator not"
" referring to this vector");
#endif
pointer __p = const_cast<pointer>(&*__position);
iterator __r = __make_iter(__p);
this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p));
@@ -1522,12 +1423,6 @@ template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this,
"vector::erase(iterator, iterator) called with an iterator not"
" referring to this vector");
#endif
_LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range");
pointer __p = this->__begin_ + (__first - begin());
iterator __r = __make_iter(__p);
this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p));
@@ -1551,11 +1446,6 @@ template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::insert(iterator, x) called with an iterator not"
" referring to this vector");
#endif
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap())
{
@@ -1590,11 +1480,6 @@ template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::insert(iterator, x) called with an iterator not"
" referring to this vector");
#endif
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap())
{
@@ -1628,11 +1513,6 @@ template <class... _Args>
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::emplace(iterator, x) called with an iterator not"
" referring to this vector");
#endif
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap())
{
@@ -1666,11 +1546,6 @@ template <class _Tp, class _Allocator>
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::insert(iterator, n, x) called with an iterator not"
" referring to this vector");
#endif
pointer __p = this->__begin_ + (__position - begin());
if (__n > 0)
{
@@ -1714,11 +1589,6 @@ typename enable_if
>::type
vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::insert(iterator, range) called with an iterator not"
" referring to this vector");
#endif
difference_type __off = __position - begin();
pointer __p = this->__begin_ + __off;
allocator_type& __a = this->__alloc();
@@ -1752,8 +1622,8 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __firs
#endif // _LIBCPP_NO_EXCEPTIONS
}
__p = _VSTD::rotate(__p, __old_last, this->__end_);
insert(__make_iter(__p), make_move_iterator(__v.begin()),
make_move_iterator(__v.end()));
insert(__make_iter(__p), move_iterator<iterator>(__v.begin()),
move_iterator<iterator>(__v.end()));
return begin() + __off;
}
@@ -1766,11 +1636,6 @@ typename enable_if
>::type
vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
{
#if _LIBCPP_DEBUG_LEVEL >= 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__position) == this,
"vector::insert(iterator, range) called with an iterator not"
" referring to this vector");
#endif
pointer __p = this->__begin_ + (__position - begin());
difference_type __n = _VSTD::distance(__first, __last);
if (__n > 0)
@@ -1833,17 +1698,14 @@ vector<_Tp, _Allocator>::swap(vector& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value)
{
_LIBCPP_ASSERT(__alloc_traits::propagate_on_container_swap::value ||
this->__alloc() == __x.__alloc(),
"vector::swap: Either propagate_on_container_swap must be true"
" or the allocators must compare equal");
_VSTD::swap(this->__begin_, __x.__begin_);
_VSTD::swap(this->__end_, __x.__end_);
_VSTD::swap(this->__end_cap(), __x.__end_cap());
__base::__swap_alloc(this->__alloc(), __x.__alloc());
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->swap(this, &__x);
#endif // _LIBCPP_DEBUG_LEVEL >= 2
#ifdef _LIBCPP_DEBUG
iterator::swap(this, &__x);
const_iterator::swap(this, &__x);
#endif // _LIBCPP_DEBUG
}
template <class _Tp, class _Allocator>
@@ -1867,48 +1729,17 @@ vector<_Tp, _Allocator>::__invariants() const
return true;
}
#if _LIBCPP_DEBUG_LEVEL >= 2
template <class _Tp, class _Allocator>
bool
vector<_Tp, _Allocator>::__dereferenceable(const const_iterator* __i) const
{
return this->__begin_ <= __i->base() && __i->base() < this->__end_;
}
template <class _Tp, class _Allocator>
bool
vector<_Tp, _Allocator>::__decrementable(const const_iterator* __i) const
{
return this->__begin_ < __i->base() && __i->base() <= this->__end_;
}
template <class _Tp, class _Allocator>
bool
vector<_Tp, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
{
const_pointer __p = __i->base() + __n;
return this->__begin_ <= __p && __p <= this->__end_;
}
template <class _Tp, class _Allocator>
bool
vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const
{
const_pointer __p = __i->base() + __n;
return this->__begin_ <= __p && __p < this->__end_;
}
#endif // _LIBCPP_DEBUG_LEVEL >= 2
template <class _Tp, class _Allocator>
#ifndef _LIBCPP_DEBUG
_LIBCPP_INLINE_VISIBILITY inline
#endif
void
vector<_Tp, _Allocator>::__invalidate_all_iterators()
{
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__invalidate_all(this);
#endif // _LIBCPP_DEBUG_LEVEL >= 2
#ifdef _LIBCPP_DEBUG
iterator::__remove_all(this);
const_iterator::__remove_all(this);
#endif // _LIBCPP_DEBUG
}
// vector<bool>
@@ -2023,10 +1854,8 @@ public:
vector(const vector& __v);
vector(const vector& __v, const allocator_type& __a);
vector& operator=(const vector& __v);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
vector(initializer_list<value_type> __il);
vector(initializer_list<value_type> __il, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -2039,11 +1868,9 @@ public:
__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _InputIterator>
typename enable_if
@@ -2062,11 +1889,9 @@ public:
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const value_type& __x);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT
{return allocator_type(this->__alloc());}
@@ -2154,11 +1979,9 @@ public:
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
iterator erase(const_iterator __first, const_iterator __last);
@@ -2244,14 +2067,14 @@ private:
{__move_assign_alloc(__c, integral_constant<bool,
__storage_traits::propagate_on_container_move_assignment::value>());}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(vector& __c, true_type)
void __move_assign_alloc(const vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(vector& __c, false_type)
void __move_assign_alloc(const vector& __c, false_type)
_NOEXCEPT
{}
@@ -2528,8 +2351,6 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
}
}
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Allocator>
vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
: __begin_(0),
@@ -2558,8 +2379,6 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const alloca
}
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _Allocator>
vector<bool, _Allocator>::~vector()
{

View File

@@ -1,17 +1,9 @@
# Get sources
file(GLOB sources ../src/*.cpp)
if(WIN32)
file(GLOB win32_sources ../src/support/win32/*.cpp)
list(APPEND sources ${win32_sources})
endif()
file(GLOB_RECURSE sources ../src/*.cpp)
# Add all the headers to the project for IDEs.
if (MSVC_IDE OR XCODE)
file(GLOB_RECURSE headers ../include/*)
if(WIN32)
file( GLOB win32_headers ../include/support/win32/*.h)
list(APPEND headers ${win32_headers})
endif()
# Force them all into the headers dir on MSVC, otherwise they end up at
# project scope because they don't have extensions.
if (MSVC_IDE)

View File

@@ -26,7 +26,7 @@ if [ -z $MACOSX_DEPLOYMENT_TARGET ]
then
if [ -z $IPHONEOS_DEPLOYMENT_TARGET ]
then
MACOSX_DEPLOYMENT_TARGET=10.7
MACOSX_DEPLOYMENT_TARGET=10.6
fi
fi
@@ -70,23 +70,14 @@ case $TRIPLE in
fi
LDSHARED_FLAGS="-o libc++.1.dylib \
-dynamiclib -nodefaultlibs \
-current_version ${RC_ProjectSourceVersion} \
-compatibility_version 1 \
-current_version ${RC_ProjectSourceVersion} -compatibility_version 1 \
-install_name /usr/lib/libc++.1.dylib \
-lSystem \
-Wl,-unexported_symbols_list,libc++unexp.exp \
${RE_EXPORT_LINE} \
-Wl,-force_symbols_not_weak_list,notweak.exp \
-Wl,-force_symbols_weak_list,weak.exp"
-Wl,-force_symbols_not_weak_list,notweak.exp "
fi
;;
*-*-mingw*)
# FIXME: removing libgcc and libsupc++ dependencies means porting libcxxrt and LLVM/compiler-rt
SOEXT=dll
LDSHARED_FLAGS="-o libc++.dll \
-shared -nodefaultlibs -Wl,--export-all-symbols -Wl,--allow-multiple-definition -Wl,--out-implib,libc++.dll.a \
-lsupc++ -lpthread -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcr100 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt"
;;
*)
RC_CFLAGS="-fPIC"
SOEXT=so
@@ -106,13 +97,8 @@ set -x
for FILE in ../src/*.cpp; do
$CXX -c -g -Os $RC_CFLAGS $EXTRA_FLAGS -nostdinc++ -I../include $FILE
done
case $TRIPLE in
*-*-mingw*)
for FILE in ../src/support/win32/*.cpp; do
$CXX -c -g -Os $RC_CFLAGS $EXTRA_FLAGS -nostdinc++ -I../include $FILE
done
;;
esac
$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
#libtool -static -o libc++.a *.o

View File

@@ -13,24 +13,16 @@
#if __APPLE__
#include <cxxabi.h>
using namespace __cxxabiv1;
using namespace __cxxabiapple;
// On Darwin, there are two STL shared libraries and a lower level ABI
// shared libray. The globals holding the current terminate handler and
// current unexpected handler are in the ABI library.
#define __terminate_handler __cxxabiapple::__cxa_terminate_handler
#define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler
#define HAVE_DEPENDENT_EH_ABI 1
#elif defined(LIBCXXRT)
#include <cxxabi.h>
using namespace __cxxabiv1;
#define HAVE_DEPENDENT_EH_ABI 1
#else // __APPLE__
static std::terminate_handler __terminate_handler;
static std::unexpected_handler __unexpected_handler;
#endif // __APPLE__
#ifndef LIBCXXRT
// libcxxrt provides implementations of these functions itself.
std::unexpected_handler
std::set_unexpected(std::unexpected_handler func) _NOEXCEPT
{
@@ -84,19 +76,18 @@ std::terminate() _NOEXCEPT
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
#endif // LIBCXXRT
bool std::uncaught_exception() _NOEXCEPT
{
#if __APPLE__
// on Darwin, there is a helper function so __cxa_get_globals is private
return __cxxabiapple::__cxa_uncaught_exception();
#elif LIBCXXRT
__cxa_eh_globals * globals = __cxa_get_globals();
return (globals->uncaughtExceptions != 0);
#else // __APPLE__
#warning uncaught_exception not yet implemented
::abort();
// Not provided by Ubuntu gcc-4.2.4's cxxabi.h.
// __cxa_eh_globals * globals = __cxa_get_globals();
// return (globals->uncaughtExceptions != 0);
#endif // __APPLE__
}
@@ -123,8 +114,8 @@ const char* bad_exception::what() const _NOEXCEPT
exception_ptr::~exception_ptr() _NOEXCEPT
{
#if HAVE_DEPENDENT_EH_ABI
__cxa_decrement_exception_refcount(__ptr_);
#if __APPLE__
__cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
#else
#warning exception_ptr not yet implemented
::abort();
@@ -134,8 +125,8 @@ exception_ptr::~exception_ptr() _NOEXCEPT
exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
: __ptr_(other.__ptr_)
{
#if HAVE_DEPENDENT_EH_ABI
__cxa_increment_exception_refcount(__ptr_);
#if __APPLE__
__cxxabiapple::__cxa_increment_exception_refcount(__ptr_);
#else
#warning exception_ptr not yet implemented
::abort();
@@ -144,11 +135,11 @@ exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
{
#if HAVE_DEPENDENT_EH_ABI
#if __APPLE__
if (__ptr_ != other.__ptr_)
{
__cxa_increment_exception_refcount(other.__ptr_);
__cxa_decrement_exception_refcount(__ptr_);
__cxxabiapple::__cxa_increment_exception_refcount(other.__ptr_);
__cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
__ptr_ = other.__ptr_;
}
return *this;
@@ -180,12 +171,12 @@ nested_exception::rethrow_nested() const
std::exception_ptr std::current_exception() _NOEXCEPT
{
#if HAVE_DEPENDENT_EH_ABI
#if __APPLE__
// be nicer if there was a constructor that took a ptr, then
// this whole function would be just:
// return exception_ptr(__cxa_current_primary_exception());
std::exception_ptr ptr;
ptr.__ptr_ = __cxa_current_primary_exception();
ptr.__ptr_ = __cxxabiapple::__cxa_current_primary_exception();
return ptr;
#else // __APPLE__
#warning exception_ptr not yet implemented
@@ -195,8 +186,8 @@ std::exception_ptr std::current_exception() _NOEXCEPT
void std::rethrow_exception(exception_ptr p)
{
#if HAVE_DEPENDENT_EH_ABI
__cxa_rethrow_primary_exception(p.__ptr_);
#if __APPLE__
__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
// if p.__ptr_ is NULL, above returns so we terminate
terminate();
#else // __APPLE__

View File

@@ -19,24 +19,35 @@
#include "cstring"
#include "cwctype"
#include "__sso_allocator"
#if _WIN32
#include <support/win32/locale_win32.h>
#else // _WIN32
#include <langinfo.h>
#endif // _!WIN32
#include <stdlib.h>
#ifdef _LIBCPP_STABLE_APPLE_ABI
namespace {
decltype(MB_CUR_MAX_L(_VSTD::declval<locale_t>()))
inline _LIBCPP_INLINE_VISIBILITY
mb_cur_max_l(locale_t loc)
{
return MB_CUR_MAX_L(loc);
}
}
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
#ifdef __cloc_defined
#ifndef _LIBCPP_STABLE_APPLE_ABI
locale_t __cloc() {
// In theory this could create a race condition. In practice
// the race condition is non-fatal since it will just create
// a little resource leak. Better approach would be appreciated.
#ifdef __APPLE__
return 0;
#else
static locale_t result = newlocale(LC_ALL_MASK, "C", 0);
return result;
#endif
}
#endif // __cloc_defined
#endif // _LIBCPP_STABLE_APPLE_ABI
namespace {
@@ -722,12 +733,10 @@ ctype<wchar_t>::do_scan_not(mask m, const char_type* low, const char_type* high)
wchar_t
ctype<wchar_t>::do_toupper(char_type c) const
{
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c;
#else
return (isascii(c) && iswlower_l(c, __cloc())) ? c-L'a'+L'A' : c;
return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
#endif
}
@@ -735,13 +744,11 @@ const wchar_t*
ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
*low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
*low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low]
: *low;
#else
*low = (isascii(*low) && islower_l(*low, __cloc())) ? (*low-L'a'+L'A') : *low;
*low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
#endif
return low;
}
@@ -749,12 +756,10 @@ ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const
wchar_t
ctype<wchar_t>::do_tolower(char_type c) const
{
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c;
#else
return (isascii(c) && isupper_l(c, __cloc())) ? c-L'A'+'a' : c;
return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
#endif
}
@@ -762,13 +767,11 @@ const wchar_t*
ctype<wchar_t>::do_tolower(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
*low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
*low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low]
: *low;
#else
*low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-L'A'+L'a' : *low;
*low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
#endif
return low;
}
@@ -828,12 +831,10 @@ ctype<char>::~ctype()
char
ctype<char>::do_toupper(char_type c) const
{
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
return isascii(c) ? __classic_upper_table()[c] : c;
#else
return (isascii(c) && islower_l(c, __cloc())) ? c-'a'+'A' : c;
return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
#endif
}
@@ -841,12 +842,10 @@ const char*
ctype<char>::do_toupper(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
*low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
*low = isascii(*low) ? __classic_upper_table()[*low] : *low;
#else
*low = (isascii(*low) && islower_l(*low, __cloc())) ? *low-'a'+'A' : *low;
*low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
#endif
return low;
}
@@ -854,12 +853,10 @@ ctype<char>::do_toupper(char_type* low, const char_type* high) const
char
ctype<char>::do_tolower(char_type c) const
{
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
return isascii(c) ? __classic_lower_table()[c] : c;
#else
return (isascii(c) && isupper_l(c, __cloc())) ? c-'A'+'a' : c;
return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
#endif
}
@@ -867,12 +864,10 @@ const char*
ctype<char>::do_tolower(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
*low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
#elif defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
*low = isascii(*low) ? __classic_lower_table()[*low] : *low;
#else
*low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-'A'+'a' : *low;
*low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
#endif
return low;
}
@@ -913,32 +908,41 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault,
const ctype<char>::mask*
ctype<char>::classic_table() _NOEXCEPT
{
#if defined(__APPLE__) || defined(__FreeBSD__)
#ifdef __APPLE__
return _DefaultRuneLocale.__runetype;
#elif defined(__GLIBC__)
return __cloc()->__ctype_b;
#elif _WIN32
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
// This is assumed to be safe, which is a nonsense assumption because we're
// going to end up dereferencing it later...
// This is assumed to be safe.
#else
return NULL;
#endif
}
#if defined(__GLIBC__)
#ifndef _LIBCPP_STABLE_APPLE_ABI
const int*
ctype<char>::__classic_lower_table() _NOEXCEPT
{
#ifdef __APPLE__
return _DefaultRuneLocale.__maplower;
#elif defined(__GLIBC__)
return __cloc()->__ctype_tolower;
#else
return NULL;
#endif
}
const int*
ctype<char>::__classic_upper_table() _NOEXCEPT
{
#ifdef __APPLE__
return _DefaultRuneLocale.__mapupper;
#elif defined(__GLIBC__)
return __cloc()->__ctype_toupper;
#else
return NULL;
#endif
}
#endif // __GLIBC__
#endif // _LIBCPP_STABLE_APPLE_ABI
// template <> class ctype_byname<char>
@@ -1032,18 +1036,17 @@ ctype_byname<wchar_t>::do_is(mask m, char_type c) const
#ifdef _LIBCPP_WCTYPE_IS_MASK
return static_cast<bool>(iswctype_l(c, m, __l));
#else
bool result = true;
if (m & space && !iswspace_l(c, __l)) result = false;
if (m & print && !iswprint_l(c, __l)) result = false;
if (m & cntrl && !iswcntrl_l(c, __l)) result = false;
if (m & upper && !iswupper_l(c, __l)) result = false;
if (m & lower && !iswlower_l(c, __l)) result = false;
if (m & alpha && !iswalpha_l(c, __l)) result = false;
if (m & digit && !iswdigit_l(c, __l)) result = false;
if (m & punct && !iswpunct_l(c, __l)) result = false;
if (m & xdigit && !iswxdigit_l(c, __l)) result = false;
if (m & blank && !iswblank_l(c, __l)) result = false;
return result;
if (m & space && !iswspace_l(c, __l)) return false;
if (m & print && !iswprint_l(c, __l)) return false;
if (m & cntrl && !iswcntrl_l(c, __l)) return false;
if (m & upper && !iswupper_l(c, __l)) return false;
if (m & lower && !iswlower_l(c, __l)) return false;
if (m & alpha && !iswalpha_l(c, __l)) return false;
if (m & digit && !iswdigit_l(c, __l)) return false;
if (m & punct && !iswpunct_l(c, __l)) return false;
if (m & xdigit && !iswxdigit_l(c, __l)) return false;
if (m & blank && !iswblank_l(c, __l)) return false;
return true;
#endif
}
@@ -1161,7 +1164,7 @@ ctype_byname<wchar_t>::do_tolower(char_type* low, const char_type* high) const
wchar_t
ctype_byname<wchar_t>::do_widen(char c) const
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
return btowc_l(c, __l);
#else
return __btowc_l(c, __l);
@@ -1172,7 +1175,7 @@ const char*
ctype_byname<wchar_t>::do_widen(const char* low, const char* high, char_type* dest) const
{
for (; low != high; ++low, ++dest)
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
*dest = btowc_l(*low, __l);
#else
*dest = __btowc_l(*low, __l);
@@ -1183,7 +1186,7 @@ ctype_byname<wchar_t>::do_widen(const char* low, const char* high, char_type* de
char
ctype_byname<wchar_t>::do_narrow(char_type c, char dfault) const
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
int r = wctob_l(c, __l);
#else
int r = __wctob_l(c, __l);
@@ -1196,7 +1199,7 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch
{
for (; low != high; ++low, ++dest)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
int r = wctob_l(*low, __l);
#else
int r = __wctob_l(*low, __l);
@@ -1310,7 +1313,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
{
// save state in case needed to reover to_nxt on error
mbstate_t save_state = st;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t n = wcsnrtombs_l(to, &frm_nxt, fend-frm, to_end-to, &st, __l);
#else
size_t n = __wcsnrtombs_l(to, &frm_nxt, fend-frm, to_end-to, &st, __l);
@@ -1320,7 +1323,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
// need to recover to_nxt
for (to_nxt = to; frm != frm_nxt; ++frm)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
n = wcrtomb_l(to_nxt, *frm, &save_state, __l);
#else
n = __wcrtomb_l(to_nxt, *frm, &save_state, __l);
@@ -1341,7 +1344,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
{
// Try to write the terminating null
extern_type tmp[MB_LEN_MAX];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
n = wcrtomb_l(tmp, intern_type(), &st, __l);
#else
n = __wcrtomb_l(tmp, intern_type(), &st, __l);
@@ -1378,7 +1381,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
{
// save state in case needed to reover to_nxt on error
mbstate_t save_state = st;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t n = mbsnrtowcs_l(to, &frm_nxt, fend-frm, to_end-to, &st, __l);
#else
size_t n = __mbsnrtowcs_l(to, &frm_nxt, fend-frm, to_end-to, &st, __l);
@@ -1388,7 +1391,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
// need to recover to_nxt
for (to_nxt = to; frm != frm_nxt; ++to_nxt)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
n = mbrtowc_l(to_nxt, frm, fend-frm, &save_state, __l);
#else
n = __mbrtowc_l(to_nxt, frm, fend-frm, &save_state, __l);
@@ -1420,7 +1423,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
if (fend != frm_end) // set up next null terminated sequence
{
// Try to write the terminating null
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
n = mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l);
#else
n = __mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l);
@@ -1444,7 +1447,7 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
{
to_nxt = to;
extern_type tmp[MB_LEN_MAX];
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t n = wcrtomb_l(tmp, intern_type(), &st, __l);
#else
size_t n = __wcrtomb_l(tmp, intern_type(), &st, __l);
@@ -1462,14 +1465,14 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
int
codecvt<wchar_t, char, mbstate_t>::do_encoding() const _NOEXCEPT
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
if (mbtowc_l((wchar_t*) 0, (const char*) 0, MB_LEN_MAX, __l) == 0)
#else
if (__mbtowc_l((wchar_t*) 0, (const char*) 0, MB_LEN_MAX, __l) == 0)
#endif
{
// stateless encoding
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
if (__l == 0 || MB_CUR_MAX_L(__l) == 1) // there are no known constant length encodings
#else
if (__l == 0 || __mb_cur_max_l(__l) == 1) // there are no known constant length encodings
@@ -1493,7 +1496,7 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
int nbytes = 0;
for (size_t nwchar_t = 0; nwchar_t < mx && frm != frm_end; ++nwchar_t)
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t n = mbrlen_l(frm, frm_end-frm, &st, __l);
#else
size_t n = __mbrlen_l(frm, frm_end-frm, &st, __l);
@@ -1519,7 +1522,7 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
int
codecvt<wchar_t, char, mbstate_t>::do_max_length() const _NOEXCEPT
{
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
return __l == 0 ? 1 : MB_CUR_MAX_L(__l);
#else
return __l == 0 ? 1 : __mb_cur_max_l(__l);
@@ -4072,7 +4075,7 @@ numpunct_byname<char>::__init(const char* nm)
throw runtime_error("numpunct_byname<char>::numpunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -4115,7 +4118,7 @@ numpunct_byname<wchar_t>::__init(const char* nm)
throw runtime_error("numpunct_byname<char>::numpunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -4710,7 +4713,7 @@ __time_get_storage<wchar_t>::__analyze(char fmt, const ctype<wchar_t>& ct)
wchar_t* wbb = wbuf;
mbstate_t mb = {0};
const char* bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t i = mbsrtowcs_l( wbb, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
size_t i = __mbsrtowcs_l( wbb, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4895,7 +4898,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%A", &t, __loc_);
mb = mbstate_t();
const char* bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
size_t j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4907,7 +4910,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%a", &t, __loc_);
mb = mbstate_t();
bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4924,7 +4927,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%B", &t, __loc_);
mb = mbstate_t();
const char* bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
size_t j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4936,7 +4939,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%b", &t, __loc_);
mb = mbstate_t();
bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4951,7 +4954,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%p", &t, __loc_);
mb = mbstate_t();
const char* bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
size_t j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -4964,7 +4967,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
be = strftime_l(buf, 100, "%p", &t, __loc_);
mb = mbstate_t();
bb = buf;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, __loc_);
@@ -5243,7 +5246,7 @@ __time_put::__do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm,
__do_put(__nar, __ne, __tm, __fmt, __mod);
mbstate_t mb = {0};
const char* __nb = __nar;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(__wb, &__nb, 100, &mb, __loc_);
#else
size_t j = __mbsrtowcs_l(__wb, &__nb, 100, &mb, __loc_);
@@ -5502,7 +5505,7 @@ moneypunct_byname<char, false>::init(const char* nm)
throw runtime_error("moneypunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -5544,7 +5547,7 @@ moneypunct_byname<char, true>::init(const char* nm)
throw runtime_error("moneypunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -5563,29 +5566,16 @@ moneypunct_byname<char, true>::init(const char* nm)
__frac_digits_ = lc->int_frac_digits;
else
__frac_digits_ = base::do_frac_digits();
#if _WIN32
if (lc->p_sign_posn == 0)
#else // _WIN32
if (lc->int_p_sign_posn == 0)
#endif //_WIN32
__positive_sign_ = "()";
else
__positive_sign_ = lc->positive_sign;
#if _WIN32
if(lc->n_sign_posn == 0)
#else // _WIN32
if (lc->int_n_sign_posn == 0)
#endif // _WIN32
__negative_sign_ = "()";
else
__negative_sign_ = lc->negative_sign;
#if _WIN32
__init_pat(__pos_format_, lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn);
__init_pat(__neg_format_, lc->n_cs_precedes, lc->n_sep_by_space, lc->n_sign_posn);
#else
__init_pat(__pos_format_, lc->int_p_cs_precedes, lc->int_p_sep_by_space, lc->int_p_sign_posn);
__init_pat(__neg_format_, lc->int_n_cs_precedes, lc->int_n_sep_by_space, lc->int_n_sign_posn);
#endif // _WIN32
}
template<>
@@ -5599,7 +5589,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
throw runtime_error("moneypunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -5616,7 +5606,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
wchar_t wbuf[100];
mbstate_t mb = {0};
const char* bb = lc->currency_symbol;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
size_t j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5635,7 +5625,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
{
mb = mbstate_t();
bb = lc->positive_sign;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5651,7 +5641,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
{
mb = mbstate_t();
bb = lc->negative_sign;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5676,7 +5666,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
throw runtime_error("moneypunct_byname"
" failed to construct for " + string(nm));
#endif // _LIBCPP_NO_EXCEPTIONS
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
lconv* lc = localeconv_l(loc.get());
#else
lconv* lc = __localeconv_l(loc.get());
@@ -5693,7 +5683,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
wchar_t wbuf[100];
mbstate_t mb = {0};
const char* bb = lc->int_curr_symbol;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
size_t j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
size_t j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5706,17 +5696,13 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
__frac_digits_ = lc->int_frac_digits;
else
__frac_digits_ = base::do_frac_digits();
#if _WIN32
if (lc->p_sign_posn == 0)
#else // _WIN32
if (lc->int_p_sign_posn == 0)
#endif // _WIN32
__positive_sign_ = L"()";
else
{
mb = mbstate_t();
bb = lc->positive_sign;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5726,17 +5712,13 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
wbe = wbuf + j;
__positive_sign_.assign(wbuf, wbe);
}
#if _WIN32
if (lc->n_sign_posn == 0)
#else // _WIN32
if (lc->int_n_sign_posn == 0)
#endif // _WIN32
__negative_sign_ = L"()";
else
{
mb = mbstate_t();
bb = lc->negative_sign;
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#ifdef _LIBCPP_STABLE_APPLE_ABI
j = mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
#else
j = __mbsrtowcs_l(wbuf, &bb, sizeof(wbuf)/sizeof(wbuf[0]), &mb, loc.get());
@@ -5746,13 +5728,8 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
wbe = wbuf + j;
__negative_sign_.assign(wbuf, wbe);
}
#if _WIN32
__init_pat(__pos_format_, lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn);
__init_pat(__neg_format_, lc->n_cs_precedes, lc->n_sep_by_space, lc->n_sign_posn);
#else // _WIN32
__init_pat(__pos_format_, lc->int_p_cs_precedes, lc->int_p_sep_by_space, lc->int_p_sign_posn);
__init_pat(__neg_format_, lc->int_n_cs_precedes, lc->int_n_sep_by_space, lc->int_n_sign_posn);
#endif // _WIN32
}
void __do_nothing(void*) {}

View File

@@ -11,9 +11,6 @@
#include "cstdlib"
#include "cwchar"
#include "cerrno"
#if _WIN32
#include "support/win32/support.h"
#endif // _WIN32
_LIBCPP_BEGIN_NAMESPACE_STD

View File

@@ -12,9 +12,7 @@
#include "vector"
#include "future"
#include <sys/types.h>
#if !_WIN32
#include <sys/sysctl.h>
#endif // _WIN32
_LIBCPP_BEGIN_NAMESPACE_STD

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::max({2, 3, 1});
assert(i == 3);
i = std::max({2, 1, 3});
@@ -31,5 +31,5 @@ int main()
assert(i == 3);
i = std::max({1, 3, 2});
assert(i == 3);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::max({2, 3, 1}, std::greater<int>());
assert(i == 1);
i = std::max({2, 1, 3}, std::greater<int>());
@@ -32,5 +32,5 @@ int main()
assert(i == 1);
i = std::max({1, 3, 2}, std::greater<int>());
assert(i == 1);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::min({2, 3, 1});
assert(i == 1);
i = std::min({2, 1, 3});
@@ -31,5 +31,5 @@ int main()
assert(i == 1);
i = std::min({1, 3, 2});
assert(i == 1);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::min({2, 3, 1}, std::greater<int>());
assert(i == 3);
i = std::min({2, 1, 3}, std::greater<int>());
@@ -32,5 +32,5 @@ int main()
assert(i == 3);
i = std::min({1, 3, 2}, std::greater<int>());
assert(i == 3);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,12 +18,12 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3)));
assert((std::minmax({1, 3, 2}) == std::pair<int, int>(1, 3)));
assert((std::minmax({2, 1, 3}) == std::pair<int, int>(1, 3)));
assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)));
assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)));
assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,12 +19,12 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
assert((std::minmax({1, 2, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({1, 3, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({2, 1, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::pair<const int, double> V;
std::map<int, double> m =
{
@@ -41,5 +41,5 @@ int main()
assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::pair<const int, double> V;
std::map<int, double> m =
{
@@ -37,5 +37,5 @@ int main()
assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::pair<const int, double> V;
typedef test_compare<std::less<int> > C;
std::map<int, double, C> m({
@@ -39,5 +39,5 @@ int main()
assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1));
assert(m.key_comp() == C(3));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -20,7 +20,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::pair<const int, double> V;
typedef test_compare<std::less<int> > C;
typedef test_allocator<std::pair<const int, double> > A;
@@ -42,5 +42,5 @@ int main()
assert(*next(m.begin(), 2) == V(3, 1));
assert(m.key_comp() == C(3));
assert(m.get_allocator() == A(6));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::pair<const int, double> V;
std::map<int, double> m =
{
@@ -39,5 +39,5 @@ int main()
assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multimap<int, double> C;
typedef C::value_type V;
C m = {{20, 1}};
@@ -46,5 +46,5 @@ int main()
assert(*++i == V(3, 1));
assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multimap<int, double> C;
typedef C::value_type V;
C m =
@@ -45,5 +45,5 @@ int main()
assert(*++i == V(3, 1));
assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef std::multimap<int, double, Cmp> C;
typedef C::value_type V;
@@ -50,5 +50,5 @@ int main()
assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2));
assert(m.key_comp() == Cmp(4));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -20,7 +20,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef test_allocator<std::pair<const int, double> > A;
typedef std::multimap<int, double, Cmp, A> C;
@@ -53,5 +53,5 @@ int main()
assert(*++i == V(3, 2));
assert(m.key_comp() == Cmp(4));
assert(m.get_allocator() == A(5));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multimap<int, double> C;
typedef C::value_type V;
C m =
@@ -49,5 +49,5 @@ int main()
assert(*++i == V(3, 1));
assert(*++i == V(3, 2));
assert(*++i == V(3, 1.5));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multiset<int> C;
typedef C::value_type V;
C m = {10, 8};
@@ -34,5 +34,5 @@ int main()
assert(*++i == V(6));
assert(*++i == V(8));
assert(*++i == V(10));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multiset<int> C;
typedef C::value_type V;
C m = {10, 8};
@@ -32,5 +32,5 @@ int main()
assert(*++i == V(4));
assert(*++i == V(5));
assert(*++i == V(6));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::multiset<int> C;
typedef C::value_type V;
C m = {1, 2, 3, 4, 5, 6};
@@ -31,5 +31,5 @@ int main()
assert(*++i == V(4));
assert(*++i == V(5));
assert(*++i == V(6));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef std::multiset<int, Cmp> C;
typedef C::value_type V;
@@ -34,5 +34,5 @@ int main()
assert(*++i == V(5));
assert(*++i == V(6));
assert(m.key_comp() == Cmp(10));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -20,7 +20,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef test_allocator<int> A;
typedef std::multiset<int, Cmp, A> C;
@@ -37,5 +37,5 @@ int main()
assert(*++i == V(6));
assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::set<int> C;
typedef C::value_type V;
C m = {10, 8};
@@ -34,5 +34,5 @@ int main()
assert(*++i == V(6));
assert(*++i == V(8));
assert(*++i == V(10));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::set<int> C;
typedef C::value_type V;
C m = {10, 8};
@@ -32,5 +32,5 @@ int main()
assert(*++i == V(4));
assert(*++i == V(5));
assert(*++i == V(6));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef std::set<int> C;
typedef C::value_type V;
C m = {1, 2, 3, 4, 5, 6};
@@ -31,5 +31,5 @@ int main()
assert(*++i == V(4));
assert(*++i == V(5));
assert(*++i == V(6));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -19,7 +19,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef std::set<int, Cmp> C;
typedef C::value_type V;
@@ -34,5 +34,5 @@ int main()
assert(*++i == V(5));
assert(*++i == V(6));
assert(m.key_comp() == Cmp(10));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -20,7 +20,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typedef test_compare<std::less<int> > Cmp;
typedef test_allocator<int> A;
typedef std::set<int, Cmp, A> C;
@@ -37,5 +37,5 @@ int main()
assert(*++i == V(6));
assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4));
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::deque<int> d;
d.assign({3, 4, 5, 6});
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,12 +16,12 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::deque<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
assert(d[0] == 3);
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::deque<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
assert(d.size() == 4);
@@ -26,5 +26,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::deque<int> d;
d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::deque<int> d(10, 1);
std::deque<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
assert(d.size() == 14);
@@ -35,5 +35,5 @@ int main()
assert(d[11] == 1);
assert(d[12] == 1);
assert(d[13] == 1);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -17,7 +17,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
typedef std::forward_list<T> C;
@@ -40,5 +40,5 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -17,7 +17,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
typedef std::forward_list<T> C;
@@ -40,5 +40,5 @@ int main()
assert(*i == 10+n);
assert(n == 4);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
typedef std::forward_list<T> C;
@@ -26,5 +26,5 @@ int main()
assert(*i == n);
assert(n == 10);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
typedef test_allocator<T> A;
@@ -30,5 +30,5 @@ int main()
assert(n == 10);
assert(c.get_allocator() == A(14));
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef int T;
typedef std::forward_list<T> C;
@@ -42,5 +42,5 @@ int main()
assert(*next(c.begin(), 3) == 1);
assert(*next(c.begin(), 4) == 2);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::list<int> d;
d.assign({3, 4, 5, 6});
assert(d.size() == 4);
@@ -25,5 +25,5 @@ int main()
assert(*i++ == 4);
assert(*i++ == 5);
assert(*i++ == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::list<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
std::list<int>::iterator i = d.begin();
@@ -24,5 +24,5 @@ int main()
assert(*i++ == 4);
assert(*i++ == 5);
assert(*i++ == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::list<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
assert(d.size() == 4);
@@ -27,5 +27,5 @@ int main()
assert(*i++ == 4);
assert(*i++ == 5);
assert(*i++ == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::list<int> d;
d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -25,5 +25,5 @@ int main()
assert(*i++ == 4);
assert(*i++ == 5);
assert(*i++ == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::list<int> d(10, 1);
std::list<int>::iterator i = d.insert(next(d.cbegin(), 2), {3, 4, 5, 6});
assert(d.size() == 14);
@@ -36,5 +36,5 @@ int main()
assert(*i++ == 1);
assert(*i++ == 1);
assert(*i++ == 1);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -58,8 +58,6 @@ int main()
assert(c2.empty());
assert(distance(c2.begin(), c2.end()) == 0);
}
#ifndef _LIBCPP_DEBUG_LEVEL
// This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
{
int a1[] = {1, 3, 7, 9, 10};
int a2[] = {0, 2, 4, 5, 6, 8, 11};
@@ -72,7 +70,6 @@ int main()
assert((c2 == std::list<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
assert(c2.get_allocator() == A(2));
}
#endif
{
int a1[] = {1, 3, 7, 9, 10};
int a2[] = {0, 2, 4, 5, 6, 8, 11};

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d;
d.assign({true, false, false, true});
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == false);
assert(d[2] == false);
assert(d[3] == true);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,12 +16,12 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d = {true, false, false, true};
assert(d.size() == 4);
assert(d[0] == true);
assert(d[1] == false);
assert(d[2] == false);
assert(d[3] == true);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int, test_allocator<int>> d({true, false, false, true}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
assert(d.size() == 4);
@@ -26,5 +26,5 @@ int main()
assert(d[1] == false);
assert(d[2] == false);
assert(d[3] == true);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<bool> d(10, true);
std::vector<bool>::iterator i = d.insert(d.cbegin() + 2, {false, true, true, false});
assert(d.size() == 14);
@@ -35,5 +35,5 @@ int main()
assert(d[11] == true);
assert(d[12] == true);
assert(d[13] == true);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<bool> d;
d = {true, false, false, true};
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == false);
assert(d[2] == false);
assert(d[3] == true);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d;
d.assign({3, 4, 5, 6});
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,12 +16,12 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d = {3, 4, 5, 6};
assert(d.size() == 4);
assert(d[0] == 3);
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -18,7 +18,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
assert(d.get_allocator() == test_allocator<int>(3));
assert(d.size() == 4);
@@ -26,5 +26,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d;
d = {3, 4, 5, 6};
assert(d.size() == 4);
@@ -24,5 +24,5 @@ int main()
assert(d[1] == 4);
assert(d[2] == 5);
assert(d[3] == 6);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -16,7 +16,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
std::vector<int> d(10, 1);
std::vector<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
assert(d.size() == 14);
@@ -35,5 +35,5 @@ int main()
assert(d[11] == 1);
assert(d[12] == 1);
assert(d[13] == 1);
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -58,8 +58,6 @@ int main()
assert(c2.empty());
assert(distance(c2.begin(), c2.end()) == 0);
}
#ifndef _LIBCPP_DEBUG_LEVEL
// This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
{
int a1[] = {1, 3, 7, 9, 10};
int a2[] = {0, 2, 4, 5, 6, 8, 11};
@@ -72,7 +70,6 @@ int main()
assert((c2 == std::vector<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
assert(c2.get_allocator() == A(2));
}
#endif
{
int a1[] = {1, 3, 7, 9, 10};
int a2[] = {0, 2, 4, 5, 6, 8, 11};

View File

@@ -24,7 +24,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
@@ -57,5 +57,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string,
test_hash<std::hash<int> >,
@@ -57,5 +57,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string,
test_hash<std::hash<int> >,
@@ -59,5 +59,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string,
test_hash<std::hash<int> >,
@@ -60,5 +60,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -26,7 +26,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string,
test_hash<std::hash<int> >,
@@ -62,5 +62,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -26,7 +26,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string,
test_hash<std::hash<int> >,
@@ -63,5 +63,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -23,7 +23,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_map<int, std::string> C;
typedef std::pair<int, std::string> P;
@@ -44,5 +44,5 @@ int main()
assert(c.at(3) == "three");
assert(c.at(4) == "four");
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
@@ -82,5 +82,5 @@ int main()
assert(c.load_factor() == (float)c.size()/c.bucket_count());
assert(c.max_load_factor() == 1);
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_multimap<int, std::string,
test_hash<std::hash<int> >,
@@ -79,5 +79,5 @@ int main()
assert(c.key_eq() == test_compare<std::equal_to<int> >());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -25,7 +25,7 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_multimap<int, std::string,
test_hash<std::hash<int> >,
@@ -81,5 +81,5 @@ int main()
assert(c.key_eq() == test_compare<std::equal_to<int> >());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

Some files were not shown because too many files have changed in this diff Show More