Compare commits
1 Commits
svn-tags/l
...
svn-tags/l
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d4fd3d0166 |
@@ -60,3 +60,4 @@ licenses, and/or restrictions:
|
||||
Program Directory
|
||||
------- ---------
|
||||
<none yet>
|
||||
|
||||
|
4
Makefile
4
Makefile
@@ -12,7 +12,7 @@ export TRIPLE=-apple-
|
||||
installsrc:: $(SRCROOT)
|
||||
|
||||
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
||||
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
||||
ditto $(SRCDIRS)/lib/buildit $(SRCROOT)/lib/buildit
|
||||
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
||||
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
||||
|
||||
@@ -36,3 +36,5 @@ install:: installhdrs $(DESTDIR)
|
||||
mkdir -p $(DSTROOT)/usr/lib
|
||||
strip -S -o $(DSTROOT)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
||||
cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib
|
||||
|
||||
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
*__seg_ &= ~__mask_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__bit_reference& operator=(const __bit_reference& __x) {return operator=(static_cast<bool>(__x));}
|
||||
|
||||
@@ -1074,14 +1074,14 @@ public:
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator operator++(int)
|
||||
{
|
||||
__bit_iterator __tmp = *this;
|
||||
++(*this);
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator& operator--()
|
||||
{
|
||||
if (__ctz_ != 0)
|
||||
@@ -1093,14 +1093,14 @@ public:
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator operator--(int)
|
||||
{
|
||||
__bit_iterator __tmp = *this;
|
||||
--(*this);
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator& operator+=(difference_type __n)
|
||||
{
|
||||
if (__n >= 0)
|
||||
@@ -1112,19 +1112,19 @@ public:
|
||||
__ctz_ = static_cast<unsigned>((__n + __ctz_) % __bits_per_word);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator& operator-=(difference_type __n)
|
||||
{
|
||||
return *this += -__n;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator operator+(difference_type __n) const
|
||||
{
|
||||
__bit_iterator __t(*this);
|
||||
__t += __n;
|
||||
return __t;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator operator-(difference_type __n) const
|
||||
{
|
||||
__bit_iterator __t(*this);
|
||||
|
183
include/__config
183
include/__config
@@ -26,26 +26,15 @@
|
||||
#if __LITTLE_ENDIAN__
|
||||
#define _LIBCPP_LITTLE_ENDIAN 1
|
||||
#define _LIBCPP_BIG_ENDIAN 0
|
||||
#endif // __LITTLE_ENDIAN__
|
||||
#endif // __LITTLE_ENDIAN__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN__
|
||||
#if __BIG_ENDIAN__
|
||||
#define _LIBCPP_LITTLE_ENDIAN 0
|
||||
#define _LIBCPP_BIG_ENDIAN 1
|
||||
#endif // __BIG_ENDIAN__
|
||||
#endif // __BIG_ENDIAN__
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
# include <sys/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define _LIBCPP_LITTLE_ENDIAN 1
|
||||
# define _LIBCPP_BIG_ENDIAN 0
|
||||
# else // _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define _LIBCPP_LITTLE_ENDIAN 0
|
||||
# define _LIBCPP_BIG_ENDIAN 1
|
||||
# endif // _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
#endif // __FreeBSD__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
|
||||
# include <endian.h>
|
||||
@@ -55,10 +44,10 @@
|
||||
# elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define _LIBCPP_LITTLE_ENDIAN 0
|
||||
# define _LIBCPP_BIG_ENDIAN 1
|
||||
# else // __BYTE_ORDER == __BIG_ENDIAN
|
||||
# else
|
||||
# error unable to determine endian
|
||||
# endif
|
||||
#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_VISIBILITY_TAG
|
||||
#define _LIBCPP_VISIBILITY_TAG 1
|
||||
@@ -67,10 +56,10 @@
|
||||
#if _LIBCPP_VISIBILITY_TAG
|
||||
#define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
|
||||
#define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default")))
|
||||
#else // _LIBCPP_VISIBILITY_TAG
|
||||
#else
|
||||
#define _LIBCPP_HIDDEN
|
||||
#define _LIBCPP_VISIBLE
|
||||
#endif // _LIBCPP_VISIBILITY_TAG
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_INLINE_VISIBILITY
|
||||
#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
|
||||
@@ -84,132 +73,39 @@
|
||||
|
||||
#define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
|
||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_exceptions))
|
||||
#define _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_rtti))
|
||||
#define _LIBCPP_NO_RTTI
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_decltype))
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_attributes))
|
||||
#define _LIBCPP_HAS_NO_ATTRIBUTES
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_deleted_functions))
|
||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#endif // !(__has_feature(cxx_deleted_functions))
|
||||
|
||||
#if !(__has_feature(cxx_lambdas))
|
||||
#define _LIBCPP_HAS_NO_LAMBDAS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_nullptr))
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_rvalue_references))
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_static_assert))
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_auto_type))
|
||||
#define _LIBCPP_HAS_NO_AUTO_TYPE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_variadic_templates))
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
#if __has_feature(cxx_inline_namespaces)
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
|
||||
#define _LIBCPP_END_NAMESPACE_STD } }
|
||||
#define _STD std::_LIBCPP_NAMESPACE
|
||||
|
||||
namespace std {
|
||||
inline namespace _LIBCPP_NAMESPACE {
|
||||
}
|
||||
using namespace _LIBCPP_NAMESPACE;
|
||||
}
|
||||
|
||||
#else // __has_feature(cxx_inline_namespaces)
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
|
||||
#define _LIBCPP_END_NAMESPACE_STD }
|
||||
#define _STD std
|
||||
#endif // __has_feature(cxx_inline_namespaces)
|
||||
|
||||
#if !(__has_feature(cxx_constexpr))
|
||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// end defined(__clang__)
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
|
||||
#if !__EXCEPTIONS
|
||||
#define _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
||||
|
||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#else // __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
#define _LIBCPP_MOVE
|
||||
#endif
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#endif
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#endif
|
||||
|
||||
#endif // __GXX_EXPERIMENTAL_CXX0X__
|
||||
#if defined(__clang__)
|
||||
#define _LIBCPP_HAS_NO_STRONG_USING
|
||||
#endif
|
||||
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_STRONG_USING
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
|
||||
#define _LIBCPP_END_NAMESPACE_STD }
|
||||
#define _STD std
|
||||
#else
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
|
||||
#define _LIBCPP_END_NAMESPACE_STD } }
|
||||
#define _STD std::_LIBCPP_NAMESPACE
|
||||
|
||||
namespace std {
|
||||
namespace _LIBCPP_NAMESPACE {
|
||||
@@ -217,12 +113,13 @@ namespace _LIBCPP_NAMESPACE {
|
||||
using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
|
||||
}
|
||||
|
||||
#endif // defined(__GNUC__)
|
||||
#define _STD std::_LIBCPP_NAMESPACE
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef unsigned short char16_t;
|
||||
typedef unsigned int char32_t;
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef unsigned short char16_t;
|
||||
typedef unsigned int char32_t;
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
|
||||
@@ -233,14 +130,16 @@ template <unsigned> struct __static_assert_check {};
|
||||
typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \
|
||||
_LIBCPP_CONCAT(__t, __LINE__)
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_DECLTYPE
|
||||
#define decltype(x) __typeof__(x)
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
#define constexpr const
|
||||
#ifdef _LIBCPP_HAS_NO_DECLTYPE
|
||||
|
||||
#define decltype(x) __typeof__(x)
|
||||
|
||||
#endif
|
||||
|
||||
#if !__EXCEPTIONS
|
||||
#define _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CONFIG
|
||||
|
@@ -243,10 +243,8 @@ public:
|
||||
virtual void destroy() = 0;
|
||||
virtual void destroy_deallocate() = 0;
|
||||
virtual _R operator()() = 0;
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const = 0;
|
||||
virtual const std::type_info& target_type() const = 0;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0>
|
||||
@@ -262,10 +260,8 @@ public:
|
||||
virtual void destroy() = 0;
|
||||
virtual void destroy_deallocate() = 0;
|
||||
virtual _R operator()(_A0) = 0;
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const = 0;
|
||||
virtual const std::type_info& target_type() const = 0;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
@@ -281,10 +277,8 @@ public:
|
||||
virtual void destroy() = 0;
|
||||
virtual void destroy_deallocate() = 0;
|
||||
virtual _R operator()(_A0, _A1) = 0;
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const = 0;
|
||||
virtual const std::type_info& target_type() const = 0;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
@@ -300,10 +294,8 @@ public:
|
||||
virtual void destroy() = 0;
|
||||
virtual void destroy_deallocate() = 0;
|
||||
virtual _R operator()(_A0, _A1, _A2) = 0;
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const = 0;
|
||||
virtual const std::type_info& target_type() const = 0;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _FD, class _Alloc, class _FB> class __func;
|
||||
@@ -321,10 +313,8 @@ public:
|
||||
virtual void destroy();
|
||||
virtual void destroy_deallocate();
|
||||
virtual _R operator()();
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const;
|
||||
virtual const std::type_info& target_type() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _F, class _Alloc, class _R>
|
||||
@@ -367,11 +357,9 @@ template<class _F, class _Alloc, class _R>
|
||||
_R
|
||||
__func<_F, _Alloc, _R()>::operator()()
|
||||
{
|
||||
return __invoke(__f_.first());
|
||||
return __invoke<_R>(__f_.first());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R>
|
||||
const void*
|
||||
__func<_F, _Alloc, _R()>::target(const type_info& __ti) const
|
||||
@@ -388,8 +376,6 @@ __func<_F, _Alloc, _R()>::target_type() const
|
||||
return typeid(_F);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0>
|
||||
class __func<_F, _Alloc, _R(_A0)>
|
||||
: public __base<_R(_A0)>
|
||||
@@ -403,10 +389,8 @@ public:
|
||||
virtual void destroy();
|
||||
virtual void destroy_deallocate();
|
||||
virtual _R operator()(_A0);
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const;
|
||||
virtual const std::type_info& target_type() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0>
|
||||
@@ -452,8 +436,6 @@ __func<_F, _Alloc, _R(_A0)>::operator()(_A0 __a0)
|
||||
return __invoke(__f_.first(), __a0);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0>
|
||||
const void*
|
||||
__func<_F, _Alloc, _R(_A0)>::target(const type_info& __ti) const
|
||||
@@ -470,8 +452,6 @@ __func<_F, _Alloc, _R(_A0)>::target_type() const
|
||||
return typeid(_F);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1>
|
||||
class __func<_F, _Alloc, _R(_A0, _A1)>
|
||||
: public __base<_R(_A0, _A1)>
|
||||
@@ -485,10 +465,8 @@ public:
|
||||
virtual void destroy();
|
||||
virtual void destroy_deallocate();
|
||||
virtual _R operator()(_A0, _A1);
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const;
|
||||
virtual const std::type_info& target_type() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1>
|
||||
@@ -534,8 +512,6 @@ __func<_F, _Alloc, _R(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1)
|
||||
return __invoke(__f_.first(), __a0, __a1);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1>
|
||||
const void*
|
||||
__func<_F, _Alloc, _R(_A0, _A1)>::target(const type_info& __ti) const
|
||||
@@ -552,8 +528,6 @@ __func<_F, _Alloc, _R(_A0, _A1)>::target_type() const
|
||||
return typeid(_F);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
|
||||
class __func<_F, _Alloc, _R(_A0, _A1, _A2)>
|
||||
: public __base<_R(_A0, _A1, _A2)>
|
||||
@@ -567,10 +541,8 @@ public:
|
||||
virtual void destroy();
|
||||
virtual void destroy_deallocate();
|
||||
virtual _R operator()(_A0, _A1, _A2);
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const;
|
||||
virtual const std::type_info& target_type() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
|
||||
@@ -616,8 +588,6 @@ __func<_F, _Alloc, _R(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2)
|
||||
return __invoke(__f_.first(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
|
||||
const void*
|
||||
__func<_F, _Alloc, _R(_A0, _A1, _A2)>::target(const type_info& __ti) const
|
||||
@@ -634,8 +604,6 @@ __func<_F, _Alloc, _R(_A0, _A1, _A2)>::target_type() const
|
||||
return typeid(_F);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
} // __function
|
||||
|
||||
template<class _R>
|
||||
@@ -660,15 +628,16 @@ public:
|
||||
function(_F,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, const function&);
|
||||
template<class _F, class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc& __a, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
// template<class _Alloc>
|
||||
// function(allocator_arg_t, const _Alloc&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, nullptr_t);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, const function&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, function&&);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(nullptr_t);
|
||||
@@ -684,9 +653,8 @@ public:
|
||||
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class _F, class _Alloc>
|
||||
void assign(_F __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, __f).swap(*this);}
|
||||
// template<class _F, class _Alloc>
|
||||
// void assign(_F, const _Alloc&);
|
||||
|
||||
// 20.7.16.2.3, function capacity:
|
||||
operator bool() const {return __f_;}
|
||||
@@ -701,12 +669,10 @@ public:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
_R operator()() const;
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename _T> _T* target();
|
||||
template <typename _T> const _T* target() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R>
|
||||
@@ -723,21 +689,6 @@ function<_R()>::function(const function& __f)
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R>
|
||||
template<class _Alloc>
|
||||
function<_R()>::function(allocator_arg_t, const _Alloc&, const function& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (const __base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R>
|
||||
template <class _F>
|
||||
function<_R()>::function(_F __f,
|
||||
@@ -764,39 +715,6 @@ function<_R()>::function(_F __f,
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R>
|
||||
template <class _F, class _Alloc>
|
||||
function<_R()>::function(allocator_arg_t, const _Alloc& __a0, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
typedef allocator_traits<_Alloc> __alloc_traits;
|
||||
if (__not_null(__f))
|
||||
{
|
||||
typedef __function::__func<_F, _Alloc, _R()> _FF;
|
||||
if (sizeof(_FF) <= sizeof(__buf_))
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
::new (__f_) _FF(__f);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename __alloc_traits::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
rebind_alloc<_FF>
|
||||
#else
|
||||
rebind_alloc<_FF>::other
|
||||
#endif
|
||||
_A;
|
||||
_A __a(__a0);
|
||||
typedef __allocator_destructor<_A> _D;
|
||||
unique_ptr<__base, _D> __hold(__a.allocate(1), _D(__a, 1));
|
||||
::new (__hold.get()) _FF(__f, _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R>
|
||||
function<_R()>&
|
||||
function<_R()>::operator=(const function& __f)
|
||||
@@ -879,15 +797,11 @@ template<class _R>
|
||||
_R
|
||||
function<_R()>::operator()() const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__f_ == 0)
|
||||
throw bad_function_call();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return (*__f_)();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R>
|
||||
const std::type_info&
|
||||
function<_R()>::target_type() const
|
||||
@@ -917,8 +831,6 @@ function<_R()>::target() const
|
||||
return (const _T*)__f_->target(typeid(_T));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0>
|
||||
class function<_R(_A0)>
|
||||
: public unary_function<_A0, _R>
|
||||
@@ -952,15 +864,16 @@ public:
|
||||
function(_F,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, const function&);
|
||||
template<class _F, class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc& __a, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
// template<class _Alloc>
|
||||
// function(allocator_arg_t, const _Alloc&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, nullptr_t);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, const function&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, function&&);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(nullptr_t);
|
||||
@@ -976,9 +889,8 @@ public:
|
||||
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class _F, class _Alloc>
|
||||
void assign(_F __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, __f).swap(*this);}
|
||||
// template<class _F, class _Alloc>
|
||||
// void assign(_F, const _Alloc&);
|
||||
|
||||
// 20.7.16.2.3, function capacity:
|
||||
operator bool() const {return __f_;}
|
||||
@@ -993,12 +905,10 @@ public:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
_R operator()(_A0) const;
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename _T> _T* target();
|
||||
template <typename _T> const _T* target() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0>
|
||||
@@ -1015,21 +925,6 @@ function<_R(_A0)>::function(const function& __f)
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0>
|
||||
template<class _Alloc>
|
||||
function<_R(_A0)>::function(allocator_arg_t, const _Alloc&, const function& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (const __base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0>
|
||||
template <class _F>
|
||||
function<_R(_A0)>::function(_F __f,
|
||||
@@ -1056,39 +951,6 @@ function<_R(_A0)>::function(_F __f,
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0>
|
||||
template <class _F, class _Alloc>
|
||||
function<_R(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
typedef allocator_traits<_Alloc> __alloc_traits;
|
||||
if (__not_null(__f))
|
||||
{
|
||||
typedef __function::__func<_F, _Alloc, _R(_A0)> _FF;
|
||||
if (sizeof(_FF) <= sizeof(__buf_))
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
::new (__f_) _FF(__f);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename __alloc_traits::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
rebind_alloc<_FF>
|
||||
#else
|
||||
rebind_alloc<_FF>::other
|
||||
#endif
|
||||
_A;
|
||||
_A __a(__a0);
|
||||
typedef __allocator_destructor<_A> _D;
|
||||
unique_ptr<__base, _D> __hold(__a.allocate(1), _D(__a, 1));
|
||||
::new (__hold.get()) _FF(__f, _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0>
|
||||
function<_R(_A0)>&
|
||||
function<_R(_A0)>::operator=(const function& __f)
|
||||
@@ -1171,15 +1033,11 @@ template<class _R, class _A0>
|
||||
_R
|
||||
function<_R(_A0)>::operator()(_A0 __a0) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__f_ == 0)
|
||||
throw bad_function_call();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return (*__f_)(__a0);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0>
|
||||
const std::type_info&
|
||||
function<_R(_A0)>::target_type() const
|
||||
@@ -1209,8 +1067,6 @@ function<_R(_A0)>::target() const
|
||||
return (const _T*)__f_->target(typeid(_T));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
class function<_R(_A0, _A1)>
|
||||
: public binary_function<_A0, _A1, _R>
|
||||
@@ -1244,15 +1100,16 @@ public:
|
||||
function(_F,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, const function&);
|
||||
template<class _F, class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc& __a, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
// template<class _Alloc>
|
||||
// function(allocator_arg_t, const _Alloc&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, nullptr_t);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, const function&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, function&&);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(nullptr_t);
|
||||
@@ -1268,9 +1125,8 @@ public:
|
||||
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class _F, class _Alloc>
|
||||
void assign(_F __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, __f).swap(*this);}
|
||||
// template<class _F, class _Alloc>
|
||||
// void assign(_F, const _Alloc&);
|
||||
|
||||
// 20.7.16.2.3, function capacity:
|
||||
operator bool() const {return __f_;}
|
||||
@@ -1285,12 +1141,10 @@ public:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
_R operator()(_A0, _A1) const;
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename _T> _T* target();
|
||||
template <typename _T> const _T* target() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
@@ -1307,25 +1161,10 @@ function<_R(_A0, _A1)>::function(const function& __f)
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
template<class _Alloc>
|
||||
function<_R(_A0, _A1)>::function(allocator_arg_t, const _Alloc&, const function& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (const __base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
template <class _F>
|
||||
function<_R(_A0, _A1)>::function(_F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
if (__not_null(__f))
|
||||
@@ -1348,39 +1187,6 @@ function<_R(_A0, _A1)>::function(_F __f,
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
template <class _F, class _Alloc>
|
||||
function<_R(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
typedef allocator_traits<_Alloc> __alloc_traits;
|
||||
if (__not_null(__f))
|
||||
{
|
||||
typedef __function::__func<_F, _Alloc, _R(_A0, _A1)> _FF;
|
||||
if (sizeof(_FF) <= sizeof(__buf_))
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
::new (__f_) _FF(__f);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename __alloc_traits::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
rebind_alloc<_FF>
|
||||
#else
|
||||
rebind_alloc<_FF>::other
|
||||
#endif
|
||||
_A;
|
||||
_A __a(__a0);
|
||||
typedef __allocator_destructor<_A> _D;
|
||||
unique_ptr<__base, _D> __hold(__a.allocate(1), _D(__a, 1));
|
||||
::new (__hold.get()) _FF(__f, _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
function<_R(_A0, _A1)>&
|
||||
function<_R(_A0, _A1)>::operator=(const function& __f)
|
||||
@@ -1463,15 +1269,11 @@ template<class _R, class _A0, class _A1>
|
||||
_R
|
||||
function<_R(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__f_ == 0)
|
||||
throw bad_function_call();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return (*__f_)(__a0, __a1);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0, class _A1>
|
||||
const std::type_info&
|
||||
function<_R(_A0, _A1)>::target_type() const
|
||||
@@ -1501,8 +1303,6 @@ function<_R(_A0, _A1)>::target() const
|
||||
return (const _T*)__f_->target(typeid(_T));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
class function<_R(_A0, _A1, _A2)>
|
||||
{
|
||||
@@ -1535,15 +1335,16 @@ public:
|
||||
function(_F,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, const function&);
|
||||
template<class _F, class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc& __a, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
// template<class _Alloc>
|
||||
// function(allocator_arg_t, const _Alloc&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, nullptr_t);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, const function&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, function&&);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(nullptr_t);
|
||||
@@ -1559,9 +1360,8 @@ public:
|
||||
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class _F, class _Alloc>
|
||||
void assign(_F __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, __f).swap(*this);}
|
||||
// template<class _F, class _Alloc>
|
||||
// void assign(_F, const _Alloc&);
|
||||
|
||||
// 20.7.16.2.3, function capacity:
|
||||
operator bool() const {return __f_;}
|
||||
@@ -1576,12 +1376,10 @@ public:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
_R operator()(_A0, _A1, _A2) const;
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename _T> _T* target();
|
||||
template <typename _T> const _T* target() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
@@ -1598,22 +1396,6 @@ function<_R(_A0, _A1, _A2)>::function(const function& __f)
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
template<class _Alloc>
|
||||
function<_R(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc&,
|
||||
const function& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (const __base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
template <class _F>
|
||||
function<_R(_A0, _A1, _A2)>::function(_F __f,
|
||||
@@ -1640,39 +1422,6 @@ function<_R(_A0, _A1, _A2)>::function(_F __f,
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
template <class _F, class _Alloc>
|
||||
function<_R(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
typedef allocator_traits<_Alloc> __alloc_traits;
|
||||
if (__not_null(__f))
|
||||
{
|
||||
typedef __function::__func<_F, _Alloc, _R(_A0, _A1, _A2)> _FF;
|
||||
if (sizeof(_FF) <= sizeof(__buf_))
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
::new (__f_) _FF(__f);
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename __alloc_traits::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
rebind_alloc<_FF>
|
||||
#else
|
||||
rebind_alloc<_FF>::other
|
||||
#endif
|
||||
_A;
|
||||
_A __a(__a0);
|
||||
typedef __allocator_destructor<_A> _D;
|
||||
unique_ptr<__base, _D> __hold(__a.allocate(1), _D(__a, 1));
|
||||
::new (__hold.get()) _FF(__f, _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
function<_R(_A0, _A1, _A2)>&
|
||||
function<_R(_A0, _A1, _A2)>::operator=(const function& __f)
|
||||
@@ -1755,15 +1504,11 @@ template<class _R, class _A0, class _A1, class _A2>
|
||||
_R
|
||||
function<_R(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__f_ == 0)
|
||||
throw bad_function_call();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return (*__f_)(__a0, __a1, __a2);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class _A0, class _A1, class _A2>
|
||||
const std::type_info&
|
||||
function<_R(_A0, _A1, _A2)>::target_type() const
|
||||
@@ -1793,29 +1538,27 @@ function<_R(_A0, _A1, _A2)>::target() const
|
||||
return (const _T*)__f_->target(typeid(_T));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template <class _F>
|
||||
template <class _F>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const function<_F>& __f, nullptr_t) {return !__f;}
|
||||
|
||||
template <class _F>
|
||||
template <class _F>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(nullptr_t, const function<_F>& __f) {return !__f;}
|
||||
|
||||
template <class _F>
|
||||
template <class _F>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const function<_F>& __f, nullptr_t) {return (bool)__f;}
|
||||
|
||||
template <class _F>
|
||||
template <class _F>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(nullptr_t, const function<_F>& __f) {return (bool)__f;}
|
||||
|
||||
template <class _F>
|
||||
template <class _F>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(function<_F>& __x, function<_F>& __y)
|
||||
@@ -1868,6 +1611,7 @@ struct __mu_return1<true, _Ti, _Uj...>
|
||||
typedef typename result_of<_Ti(_Uj...)>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <class _Ti, class ..._Uj, size_t ..._Indx>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename __mu_return1<true, _Ti, _Uj...>::type
|
||||
@@ -2005,7 +1749,7 @@ __apply_functor(_F& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
|
||||
return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
|
||||
}
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
class __bind
|
||||
{
|
||||
_F __f_;
|
||||
@@ -2023,7 +1767,7 @@ public:
|
||||
operator()(_Args&& ...__args)
|
||||
{
|
||||
// compiler bug workaround
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(__args...));
|
||||
}
|
||||
|
||||
@@ -2031,15 +1775,15 @@ public:
|
||||
typename __bind_return<_F, tuple<_BoundArgs...>, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args) const
|
||||
{
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(__args...));
|
||||
}
|
||||
};
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
struct __is_bind_expression<__bind<_F, _BoundArgs...> > : public true_type {};
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
class __bind_r
|
||||
: public __bind<_F, _BoundArgs...>
|
||||
{
|
||||
@@ -2067,10 +1811,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
struct __is_bind_expression<__bind_r<_R, _F, _BoundArgs...> > : public true_type {};
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__bind<typename decay<_F>::type, typename decay<_BoundArgs>::type...>
|
||||
bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
@@ -2079,7 +1823,7 @@ bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
return type(_STD::forward<_F>(__f), _STD::forward<_BoundArgs>(__bound_args)...);
|
||||
}
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__bind_r<_R, typename decay<_F>::type, typename decay<_BoundArgs>::type...>
|
||||
bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
@@ -2089,4 +1833,4 @@ bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
}
|
||||
*/
|
||||
|
||||
#endif // _LIBCPP_FUNCTIONAL_03
|
||||
#endif
|
||||
|
@@ -457,7 +457,7 @@ private:
|
||||
public:
|
||||
// construct/copy/destroy
|
||||
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) : __f_(&__f) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
|
||||
#endif
|
||||
|
||||
@@ -511,20 +511,10 @@ cref(reference_wrapper<_Tp> __t)
|
||||
return cref(__t.get());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
template <class _Tp> void ref(const _Tp&& __t) = delete;
|
||||
template <class _Tp> void cref(const _Tp&& __t) = delete;
|
||||
|
||||
#else // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
template <class _Tp> void ref(const _Tp&& __t);// = delete;
|
||||
template <class _Tp> void cref(const _Tp&& __t);// = delete;
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> void ref(const _Tp&& __t);// = delete; // LWG 688
|
||||
template <class _Tp> void cref(const _Tp&& __t);// = delete; // LWG 688
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
|
@@ -235,84 +235,84 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile>
|
||||
// __invoke
|
||||
|
||||
// __ref_return0
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _HasResultType>
|
||||
// struct ________ref_return0 // _HasResultType is true
|
||||
// {
|
||||
// typedef typename _Tp::result_type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct ________ref_return0<_Tp, false>
|
||||
// {
|
||||
// typedef void type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _IsClass>
|
||||
// struct ____ref_return0 // _IsClass is true
|
||||
// : public ________ref_return0<_Tp, __has_result_type<typename remove_cv<_Tp>::type>::value>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _HasResultType>
|
||||
// struct ______ref_return0 // _HasResultType is true
|
||||
// {
|
||||
// typedef typename __callable_type<_Tp>::result_type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct ______ref_return0<_Tp, false> // pointer to member data
|
||||
// {
|
||||
// typedef void type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct ____ref_return0<_Tp, false>
|
||||
// : public ______ref_return0<typename remove_cv<_Tp>::type,
|
||||
// __has_result_type<__callable_type<typename remove_cv<_Tp>::type> >::value>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct __ref_return0
|
||||
// : public ____ref_return0<typename remove_reference<_Tp>::type,
|
||||
// is_class<typename remove_reference<_Tp>::type>::value>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// __ref_return1
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _IsClass, class _A0>
|
||||
// struct ____ref_return1 // _IsClass is true
|
||||
// {
|
||||
// typedef typename result_of<_Tp(_A0)>::type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _HasResultType, class _A0>
|
||||
// struct ______ref_return1 // _HasResultType is true
|
||||
// {
|
||||
// typedef typename __callable_type<_Tp>::result_type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0, bool>
|
||||
// struct __ref_return1_member_data1;
|
||||
//
|
||||
//
|
||||
// template <class _R, class _C, class _A0>
|
||||
// struct __ref_return1_member_data1<_R _C::*, _A0, true>
|
||||
// {
|
||||
// typedef typename __apply_cv<_A0, _R>::type& type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _R, class _C, class _A0>
|
||||
// struct __ref_return1_member_data1<_R _C::*, _A0, false>
|
||||
// {
|
||||
// static _A0 __a;
|
||||
// typedef typename __apply_cv<decltype(*__a), _R>::type& type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0>
|
||||
// struct __ref_return1_member_data;
|
||||
//
|
||||
//
|
||||
// template <class _R, class _C, class _A0>
|
||||
// struct __ref_return1_member_data<_R _C::*, _A0>
|
||||
// : public __ref_return1_member_data1<_R _C::*, _A0,
|
||||
@@ -320,90 +320,90 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile>
|
||||
// typename remove_cv<typename remove_reference<_A0>::type>::type>::value>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0>
|
||||
// struct ______ref_return1<_Tp, false, _A0> // pointer to member data
|
||||
// : public __ref_return1_member_data<typename remove_cv<_Tp>::type, _A0>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0>
|
||||
// struct ____ref_return1<_Tp, false, _A0>
|
||||
// : public ______ref_return1<typename remove_cv<_Tp>::type,
|
||||
// __has_result_type<__callable_type<typename remove_cv<_Tp>::type> >::value, _A0>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0>
|
||||
// struct __ref_return1
|
||||
// : public ____ref_return1<typename remove_reference<_Tp>::type,
|
||||
// is_class<typename remove_reference<_Tp>::type>::value, _A0>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// __ref_return2
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _IsClass, class _A0, class _A1>
|
||||
// struct ____ref_return2 // _IsClass is true
|
||||
// {
|
||||
// typedef typename result_of<_Tp(_A0, _A1)>::type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _HasResultType, class _A0, class _A1>
|
||||
// struct ______ref_return2 // _HasResultType is true
|
||||
// {
|
||||
// typedef typename __callable_type<_Tp>::result_type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct ______ref_return2<_Tp, false, class _A0, class _A1> // pointer to member data
|
||||
// {
|
||||
// static_assert(sizeof(_Tp) == 0, "An attempt has been made to `call` a pointer"
|
||||
// " to member data with too many arguments.");
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0, class _A1>
|
||||
// struct ____ref_return2<_Tp, false, _A0, _A1>
|
||||
// : public ______ref_return2<typename remove_cv<_Tp>::type,
|
||||
// __has_result_type<__callable_type<typename remove_cv<_Tp>::type> >::value, _A0, _A1>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0, class _A1>
|
||||
// struct __ref_return2
|
||||
// : public ____ref_return2<typename remove_reference<_Tp>::type,
|
||||
// is_class<typename remove_reference<_Tp>::type>::value, _A0, _A1>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// __ref_return3
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _IsClass, class _A0, class _A1, class _A2>
|
||||
// struct ____ref_return3 // _IsClass is true
|
||||
// {
|
||||
// typedef typename result_of<_Tp(_A0, _A1, _A2)>::type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, bool _HasResultType, class _A0, class _A1, class _A2>
|
||||
// struct ______ref_return3 // _HasResultType is true
|
||||
// {
|
||||
// typedef typename __callable_type<_Tp>::result_type type;
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp>
|
||||
// struct ______ref_return3<_Tp, false, class _A0, class _A1, class _A2> // pointer to member data
|
||||
// {
|
||||
// static_assert(sizeof(_Tp) == 0, "An attempt has been made to `call` a pointer"
|
||||
// " to member data with too many arguments.");
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0, class _A1, class _A2>
|
||||
// struct ____ref_return3<_Tp, false, _A0, _A1, _A2>
|
||||
// : public ______ref_return3<typename remove_cv<_Tp>::type,
|
||||
// __has_result_type<__callable_type<typename remove_cv<_Tp>::type> >::value, _A0, _A1, _A2>
|
||||
// {
|
||||
// };
|
||||
//
|
||||
//
|
||||
// template <class _Tp, class _A0, class _A1, class _A2>
|
||||
// struct __ref_return3
|
||||
// : public ____ref_return3<typename remove_reference<_Tp>::type,
|
||||
@@ -411,6 +411,7 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile>
|
||||
// {
|
||||
// };
|
||||
|
||||
|
||||
// first bullet
|
||||
|
||||
template <class _R, class _T, class _T1>
|
||||
@@ -910,7 +911,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2)
|
||||
// {
|
||||
// return __f();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// template <class _R, class _F, class _A0>
|
||||
// inline _LIBCPP_INLINE_VISIBILITY
|
||||
// typename enable_if
|
||||
@@ -922,7 +923,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2)
|
||||
// {
|
||||
// return __f(__a0);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// template <class _R, class _F, class _A0, class _A1>
|
||||
// inline _LIBCPP_INLINE_VISIBILITY
|
||||
// _R
|
||||
@@ -930,7 +931,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2)
|
||||
// {
|
||||
// return __f(__a0, __a1);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// template <class _R, class _F, class _A0, class _A1, class _A2>
|
||||
// inline _LIBCPP_INLINE_VISIBILITY
|
||||
// _R
|
||||
@@ -1080,4 +1081,4 @@ cref(reference_wrapper<_Tp> __t)
|
||||
return cref(__t.get());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_FUNCTIONAL_BASE_03
|
||||
#endif
|
||||
|
@@ -346,7 +346,7 @@ public:
|
||||
__bucket_list_deallocator(const allocator_type& __a, size_type __size)
|
||||
: __data_(__size, __a) {}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
__bucket_list_deallocator(__bucket_list_deallocator&& __x)
|
||||
: __data_(_STD::move(__x.__data_))
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
__x.size() = 0;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
size_type& size() {return __data_.first();}
|
||||
size_type size() const {return __data_.first();}
|
||||
@@ -486,14 +486,14 @@ public:
|
||||
explicit __hash_table(const allocator_type& __a);
|
||||
__hash_table(const __hash_table& __u);
|
||||
__hash_table(const __hash_table& __u, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__hash_table(__hash_table&& __u);
|
||||
__hash_table(__hash_table&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
~__hash_table();
|
||||
|
||||
__hash_table& operator=(const __hash_table& __u);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__hash_table& operator=(__hash_table&& __u);
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
@@ -512,31 +512,31 @@ public:
|
||||
iterator __node_insert_multi(const_iterator __p,
|
||||
__node_pointer __nd);
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> __emplace_unique(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator __emplace_multi(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
|
||||
pair<iterator, bool> __insert_unique(const value_type& __x);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P>
|
||||
pair<iterator, bool> __insert_unique(_P&& __x);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P>
|
||||
iterator __insert_multi(_P&& __x);
|
||||
template <class _P>
|
||||
iterator __insert_multi(const_iterator __p, _P&& __x);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
iterator __insert_multi(const value_type& __x);
|
||||
iterator __insert_multi(const_iterator __p, const value_type& __x);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void clear();
|
||||
void rehash(size_type __n);
|
||||
@@ -615,13 +615,11 @@ public:
|
||||
private:
|
||||
void __rehash(size_type __n);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class ..._Args>
|
||||
__node_holder __construct_node(_Args&& ...__args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
__node_holder __construct_node(value_type&& __v, size_t __hash);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
__node_holder __construct_node(const value_type& __v);
|
||||
#endif
|
||||
__node_holder __construct_node(const value_type& __v, size_t __hash);
|
||||
@@ -736,7 +734,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
|
||||
@@ -779,7 +777,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
|
||||
@@ -844,7 +842,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach()
|
||||
return __cache;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
void
|
||||
@@ -888,7 +886,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
const_iterator __i = __u.begin();
|
||||
while (__cache != nullptr && __u.size() != 0)
|
||||
{
|
||||
@@ -904,7 +902,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
||||
__deallocate(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__deallocate(__cache);
|
||||
}
|
||||
const_iterator __i = __u.begin();
|
||||
@@ -928,7 +926,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
@@ -942,7 +940,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __cache != nullptr && __first != __last; ++__first)
|
||||
{
|
||||
__cache->__value_ = *__first;
|
||||
@@ -957,7 +955,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first
|
||||
__deallocate(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__deallocate(__cache);
|
||||
}
|
||||
for (; __first != __last; ++__first)
|
||||
@@ -976,7 +974,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __cache != nullptr && __first != __last; ++__first)
|
||||
{
|
||||
__cache->__value_ = *__first;
|
||||
@@ -991,7 +989,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
|
||||
__deallocate(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__deallocate(__cache);
|
||||
}
|
||||
for (; __first != __last; ++__first)
|
||||
@@ -1132,7 +1130,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __c
|
||||
for (bool __found = false; __pn->__next_ != nullptr &&
|
||||
__pn->__next_->__hash_ % __bc == __chash;
|
||||
__pn = __pn->__next_)
|
||||
{
|
||||
{
|
||||
// __found key_eq() action
|
||||
// false false loop
|
||||
// true true loop
|
||||
@@ -1247,8 +1245,7 @@ __done:
|
||||
return pair<iterator, bool>(iterator(__nd), __inserted);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -1285,8 +1282,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _P>
|
||||
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
||||
@@ -1299,9 +1294,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(_P&& __x)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _P>
|
||||
@@ -1326,7 +1321,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
||||
@@ -1349,7 +1344,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
void
|
||||
@@ -1414,7 +1409,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __nbc)
|
||||
__pp->__next_ = __np->__next_;
|
||||
__np->__next_ = __bucket_list_[__chash]->__next_;
|
||||
__bucket_list_[__chash]->__next_ = __cp;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1468,13 +1463,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
|
||||
return const_iterator(__nd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return end();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class ..._Args>
|
||||
@@ -1490,8 +1484,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
||||
@@ -1506,7 +1498,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
@@ -1521,7 +1513,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
|
@@ -108,7 +108,7 @@ class locale::id
|
||||
{
|
||||
once_flag __flag_;
|
||||
int32_t __id_;
|
||||
|
||||
|
||||
static int32_t __next_id;
|
||||
public:
|
||||
id() {}
|
||||
@@ -134,10 +134,8 @@ template <class _Facet>
|
||||
locale
|
||||
locale::combine(const locale& __other) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!_STD::has_facet<_Facet>(__other))
|
||||
throw runtime_error("locale::combine: locale missing facet");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return locale(*this, &const_cast<_Facet&>(_STD::use_facet<_Facet>(__other)));
|
||||
}
|
||||
|
||||
@@ -308,7 +306,7 @@ public:
|
||||
static const mask punct = _CTYPE_P;
|
||||
static const mask xdigit = _CTYPE_X;
|
||||
static const mask blank = _CTYPE_B;
|
||||
#else // __APPLE__
|
||||
#else /* !__APPLE__ */
|
||||
static const mask space = _ISspace;
|
||||
static const mask print = _ISprint;
|
||||
static const mask cntrl = _IScntrl;
|
||||
@@ -319,7 +317,7 @@ public:
|
||||
static const mask punct = _ISpunct;
|
||||
static const mask xdigit = _ISxdigit;
|
||||
static const mask blank = _ISblank;
|
||||
#endif // __APPLE__
|
||||
#endif /* __APPLE__ */
|
||||
static const mask alnum = alpha | digit;
|
||||
static const mask graph = alnum | punct;
|
||||
|
||||
@@ -335,7 +333,7 @@ class ctype<wchar_t>
|
||||
{
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
explicit ctype(size_t __refs = 0)
|
||||
: locale::facet(__refs) {}
|
||||
|
@@ -115,7 +115,7 @@ private:
|
||||
unique_lock& operator=(unique_lock const&); // = delete;
|
||||
|
||||
public:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unique_lock(unique_lock&& __u)
|
||||
: __m_(__u.__m_), __owns_(__u.__owns_)
|
||||
{__u.__m_ = nullptr; __u.__owns_ = false;}
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
__u.__owns_ = false;
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void lock();
|
||||
bool try_lock();
|
||||
|
@@ -18,7 +18,7 @@ protected:
|
||||
void __throw_out_of_range() const;
|
||||
};
|
||||
|
||||
template <class _Tp, class _Allocator = allocator<_Tp> >
|
||||
template <class _Tp, class _Allocator>
|
||||
struct __split_buffer
|
||||
: private __split_buffer_common<true>
|
||||
{
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
__split_buffer(const __split_buffer&);
|
||||
__split_buffer& operator=(const __split_buffer&);
|
||||
public:
|
||||
typedef _Tp value_type;
|
||||
typedef _Tp value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
typedef typename remove_reference<allocator_type>::type __alloc_rr;
|
||||
typedef allocator_traits<__alloc_rr> __alloc_traits;
|
||||
@@ -58,11 +58,11 @@ public:
|
||||
__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
|
||||
~__split_buffer();
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__split_buffer(__split_buffer&& __c);
|
||||
__split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
|
||||
__split_buffer& operator=(__split_buffer&& __c);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY iterator begin() {return __begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return __begin_;}
|
||||
@@ -85,12 +85,12 @@ public:
|
||||
void shrink_to_fit();
|
||||
void push_front(const_reference __x);
|
||||
void push_back(const_reference __x);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push_front(value_type&& __x);
|
||||
void push_back(value_type&& __x);
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
|
||||
@@ -367,7 +367,7 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer()
|
||||
__alloc_traits::deallocate(__alloc(), __first_, capacity());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
|
||||
@@ -425,7 +425,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -463,7 +463,7 @@ __split_buffer<_Tp, _Allocator>::shrink_to_fit()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__split_buffer<value_type, __alloc_rr&> __t(size(), 0, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
@@ -477,7 +477,7 @@ __split_buffer<_Tp, _Allocator>::shrink_to_fit()
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * (__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 2) / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_STD::swap(__first_, __t.__first_);
|
||||
@@ -510,7 +510,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -528,7 +528,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * (__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 2) / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_STD::swap(__first_, __t.__first_);
|
||||
@@ -542,7 +542,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -574,7 +574,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -606,8 +606,6 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -639,9 +637,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -343,7 +343,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z)
|
||||
// but copy __z's color. This does not impact __x or __w.
|
||||
if (__y != __z)
|
||||
{
|
||||
// __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
|
||||
// __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
|
||||
__y->__parent_ = __z->__parent_;
|
||||
if (__tree_is_left_child(__z))
|
||||
__y->__parent_->__left_ = __y;
|
||||
@@ -413,8 +413,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z)
|
||||
}
|
||||
// reset sibling, and it still can't be null
|
||||
__w = __tree_is_left_child(__x) ?
|
||||
__x->__parent_->__right_ :
|
||||
__x->__parent_->__left_;
|
||||
__x->__parent_->__right_ :
|
||||
__x->__parent_->__left_;
|
||||
// continue;
|
||||
}
|
||||
else // __w has a red child
|
||||
@@ -465,8 +465,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z)
|
||||
}
|
||||
// reset sibling, and it still can't be null
|
||||
__w = __tree_is_left_child(__x) ?
|
||||
__x->__parent_->__right_ :
|
||||
__x->__parent_->__left_;
|
||||
__x->__parent_->__right_ :
|
||||
__x->__parent_->__left_;
|
||||
// continue;
|
||||
}
|
||||
else // __w has a red child
|
||||
@@ -496,6 +496,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z)
|
||||
|
||||
template <class> class __map_node_destructor;
|
||||
|
||||
|
||||
template <class _Allocator>
|
||||
class __tree_node_destructor
|
||||
{
|
||||
@@ -589,14 +590,14 @@ public:
|
||||
|
||||
value_type __value_;
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class ..._Args>
|
||||
explicit __tree_node(_Args&& ...__args)
|
||||
: __value_(_STD::forward<_Args>(__args)...) {}
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#else
|
||||
explicit __tree_node(const value_type& __v)
|
||||
: __value_(__v) {}
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class> class __map_iterator;
|
||||
@@ -827,11 +828,11 @@ public:
|
||||
void __assign_unique(_InputIterator __first, _InputIterator __last);
|
||||
template <class _InputIterator>
|
||||
void __assign_multi(_InputIterator __first, _InputIterator __last);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__tree(__tree&& __t);
|
||||
__tree(__tree&& __t, const allocator_type& __a);
|
||||
__tree& operator=(__tree&& __t);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
~__tree();
|
||||
|
||||
@@ -846,8 +847,7 @@ public:
|
||||
|
||||
void swap(__tree& __t);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
pair<iterator, bool>
|
||||
__emplace_unique(_Args&&... __args);
|
||||
@@ -861,7 +861,6 @@ public:
|
||||
template <class... _Args>
|
||||
iterator
|
||||
__emplace_hint_multi(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _V>
|
||||
pair<iterator, bool> __insert_unique(_V&& __v);
|
||||
@@ -871,13 +870,13 @@ public:
|
||||
iterator __insert_multi(_V&& __v);
|
||||
template <class _V>
|
||||
iterator __insert_multi(const_iterator __p, _V&& __v);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
pair<iterator, bool> __insert_unique(const value_type& __v);
|
||||
iterator __insert_unique(const_iterator __p, const value_type& __v);
|
||||
iterator __insert_multi(const value_type& __v);
|
||||
iterator __insert_multi(const_iterator __p, const value_type& __v);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
|
||||
iterator __node_insert_unique(const_iterator __p,
|
||||
@@ -969,10 +968,10 @@ private:
|
||||
__find_equal(const_iterator __hint, typename __node::base::pointer& __parent,
|
||||
const _Key& __v);
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class ..._Args>
|
||||
__node_holder __construct_node(_Args&& ...__args);
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#else
|
||||
__node_holder __construct_node(const value_type& __v);
|
||||
#endif
|
||||
|
||||
@@ -1103,10 +1102,8 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu
|
||||
if (size() != 0)
|
||||
{
|
||||
__node_pointer __cache = __detach();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
for (; __cache != nullptr && __first != __last; ++__first)
|
||||
{
|
||||
__cache->__value_ = *__first;
|
||||
@@ -1114,7 +1111,6 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu
|
||||
__node_insert_unique(__cache);
|
||||
__cache = __next;
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -1123,7 +1119,6 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu
|
||||
destroy(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (__cache != nullptr)
|
||||
{
|
||||
while (__cache->__parent_ != nullptr)
|
||||
@@ -1143,10 +1138,8 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
|
||||
if (size() != 0)
|
||||
{
|
||||
__node_pointer __cache = __detach();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
for (; __cache != nullptr && __first != __last; ++__first)
|
||||
{
|
||||
__cache->__value_ = *__first;
|
||||
@@ -1154,7 +1147,6 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
|
||||
__node_insert_multi(__cache);
|
||||
__cache = __next;
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -1163,7 +1155,6 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
|
||||
destroy(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (__cache != nullptr)
|
||||
{
|
||||
while (__cache->__parent_ != nullptr)
|
||||
@@ -1184,7 +1175,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
|
||||
__begin_node() = __end_node();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
|
||||
@@ -1262,10 +1253,8 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
|
||||
if (size() != 0)
|
||||
{
|
||||
__node_pointer __cache = __detach();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
while (__cache != nullptr && __t.size() != 0)
|
||||
{
|
||||
__cache->__value_ = _STD::move(__t.remove(__t.begin())->__value_);
|
||||
@@ -1273,7 +1262,6 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
|
||||
__node_insert_multi(__cache);
|
||||
__cache = __next;
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -1282,7 +1270,6 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
|
||||
destroy(__cache);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (__cache != nullptr)
|
||||
{
|
||||
while (__cache->__parent_ != nullptr)
|
||||
@@ -1304,7 +1291,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
__tree<_Tp, _Compare, _Allocator>::~__tree()
|
||||
@@ -1593,8 +1580,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_node_at(__node_base_pointer __parent
|
||||
++size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
template <class ..._Args>
|
||||
@@ -1669,8 +1655,6 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
|
||||
return iterator(static_cast<__node_pointer>(__h.release()));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
template <class _V>
|
||||
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
||||
@@ -1731,7 +1715,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v)
|
||||
return iterator(__h.release());
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
typename __tree<_Tp, _Compare, _Allocator>::__node_holder
|
||||
@@ -1800,7 +1784,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const valu
|
||||
return iterator(__h.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <__tuple_03>
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
@@ -41,6 +41,7 @@ template <class _T1, class _T2> struct __tuple_like<const pair<_T1, _T2> > : tru
|
||||
template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
|
||||
template <class _Tp, size_t _Size> struct __tuple_like<const array<_Tp, _Size> > : true_type {};
|
||||
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
typename tuple_element<_Ip, tuple<_Tp...>>::type&
|
||||
get(tuple<_Tp...>&);
|
||||
|
@@ -22,4 +22,4 @@ template <size_t _Ip, class _Tp> class tuple_element;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP___TUPLE_03
|
||||
#endif
|
||||
|
@@ -469,29 +469,21 @@ template <class RandomAccessIterator, class Compare>
|
||||
void
|
||||
sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);
|
||||
|
||||
template <class RandomAccessIterator>
|
||||
template <class RandomAccessIterator>
|
||||
bool
|
||||
is_heap(RandomAccessIterator first, RandomAccessiterator last);
|
||||
is_heap(RandomAccessIterator first, RandomAccessiterator last);
|
||||
|
||||
template <class RandomAccessIterator, class Compare>
|
||||
template <class RandomAccessIterator, class Compare>
|
||||
bool
|
||||
is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp);
|
||||
is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp);
|
||||
|
||||
template <class RandomAccessIterator>
|
||||
template <class RandomAccessIterator>
|
||||
RandomAccessIterator
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessiterator last);
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessiterator last);
|
||||
|
||||
template <class RandomAccessIterator, class Compare>
|
||||
template <class RandomAccessIterator, class Compare>
|
||||
RandomAccessIterator
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp);
|
||||
|
||||
template <class ForwardIterator>
|
||||
ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last);
|
||||
|
||||
template <class ForwardIterator, class Compare>
|
||||
ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last, Compare comp);
|
||||
is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp);
|
||||
|
||||
template <class T>
|
||||
const T&
|
||||
@@ -501,22 +493,6 @@ template <class T, class Compare>
|
||||
const T&
|
||||
min(const T& a, const T& b, Compare comp);
|
||||
|
||||
template<class T>
|
||||
T
|
||||
min(initializer_list<T> t);
|
||||
|
||||
template<class T, class Compare>
|
||||
T
|
||||
min(initializer_list<T> t, Compare comp);
|
||||
|
||||
template <class ForwardIterator>
|
||||
ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last);
|
||||
|
||||
template <class ForwardIterator, class Compare>
|
||||
ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last, Compare comp);
|
||||
|
||||
template <class T>
|
||||
const T&
|
||||
max(const T& a, const T& b);
|
||||
@@ -525,37 +501,21 @@ template <class T, class Compare>
|
||||
const T&
|
||||
max(const T& a, const T& b, Compare comp);
|
||||
|
||||
template<class T>
|
||||
T
|
||||
max(initializer_list<T> t);
|
||||
template <class ForwardIterator>
|
||||
ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last);
|
||||
|
||||
template<class T, class Compare>
|
||||
T
|
||||
max(initializer_list<T> t, Compare comp);
|
||||
template <class ForwardIterator, class Compare>
|
||||
ForwardIterator
|
||||
min_element(ForwardIterator first, ForwardIterator last, Compare comp);
|
||||
|
||||
template<class ForwardIterator>
|
||||
pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element(ForwardIterator first, ForwardIterator last);
|
||||
template <class ForwardIterator>
|
||||
ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last);
|
||||
|
||||
template<class ForwardIterator, class Compare>
|
||||
pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element(ForwardIterator first, ForwardIterator last, Compare comp);
|
||||
|
||||
template<class T>
|
||||
pair<const T&, const T&>
|
||||
minmax(const T& a, const T& b);
|
||||
|
||||
template<class T, class Compare>
|
||||
pair<const T&, const T&>
|
||||
minmax(const T& a, const T& b, Compare comp);
|
||||
|
||||
template<class T>
|
||||
pair<T, T>
|
||||
minmax(initializer_list<T> t);
|
||||
|
||||
template<class T, class Compare>
|
||||
pair<T, T>
|
||||
minmax(initializer_list<T> t, Compare comp);
|
||||
template <class ForwardIterator, class Compare>
|
||||
ForwardIterator
|
||||
max_element(ForwardIterator first, ForwardIterator last, Compare comp);
|
||||
|
||||
template <class InputIterator1, class InputIterator2>
|
||||
bool
|
||||
@@ -567,7 +527,7 @@ template <class InputIterator1, class InputIterator2, class Compare>
|
||||
InputIterator2 first2, InputIterator2 last2, Compare comp);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool
|
||||
bool
|
||||
next_permutation(BidirectionalIterator first, BidirectionalIterator last);
|
||||
|
||||
template <class BidirectionalIterator, class Compare>
|
||||
@@ -1200,7 +1160,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||
break;
|
||||
++__first1;
|
||||
}
|
||||
#else // !_LIBCPP_UNROLL_LOOPS
|
||||
#else // _LIBCPP_UNROLL_LOOPS
|
||||
for (_D1 __loop_unroll = (__s - __first1) / 4; __loop_unroll > 0; --__loop_unroll)
|
||||
{
|
||||
if (__pred(*__first1, *__first2))
|
||||
@@ -1230,7 +1190,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||
return __last1;
|
||||
}
|
||||
__phase2:
|
||||
#endif // !_LIBCPP_UNROLL_LOOPS
|
||||
#endif // _LIBCPP_UNROLL_LOOPS
|
||||
_RandomAccessIterator1 __m1 = __first1;
|
||||
_RandomAccessIterator2 __m2 = __first2;
|
||||
#if !_LIBCPP_UNROLL_LOOPS
|
||||
@@ -1245,7 +1205,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else // !_LIBCPP_UNROLL_LOOPS
|
||||
#else // _LIBCPP_UNROLL_LOOPS
|
||||
++__m2;
|
||||
++__m1;
|
||||
for (_D2 __loop_unroll = (__last2 - __m2) / 4; __loop_unroll > 0; --__loop_unroll)
|
||||
@@ -1281,7 +1241,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||
}
|
||||
__continue:
|
||||
++__first1;
|
||||
#endif // !_LIBCPP_UNROLL_LOOPS
|
||||
#endif // _LIBCPP_UNROLL_LOOPS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1995,6 +1955,7 @@ __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __
|
||||
return __result;
|
||||
}
|
||||
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_OutputIterator
|
||||
@@ -2122,7 +2083,7 @@ __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomA
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
|
||||
|
||||
|
||||
if (__first == __middle)
|
||||
return __last;
|
||||
if (__middle == __last)
|
||||
@@ -2186,6 +2147,42 @@ rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterato
|
||||
return _STD::copy(__first, __middle, _STD::copy(__middle, __last, __result));
|
||||
}
|
||||
|
||||
// min
|
||||
|
||||
template <class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
return __comp(__b, __a) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
return _STD::min(__a, __b, __less<_Tp>());
|
||||
}
|
||||
|
||||
// max
|
||||
|
||||
template <class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
return __comp(__a, __b) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
return _STD::max(__a, __b, __less<_Tp>());
|
||||
}
|
||||
|
||||
// min_element
|
||||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
@@ -2208,42 +2205,7 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
_ForwardIterator
|
||||
min_element(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _STD::min_element(__first, __last,
|
||||
__less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
||||
// min
|
||||
|
||||
template <class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
return __comp(__b, __a) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
return _STD::min(__a, __b, __less<_Tp>());
|
||||
}
|
||||
|
||||
template<class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
return *_STD::min_element(__t.begin(), __t.end(), __comp);
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t)
|
||||
{
|
||||
return *_STD::min_element(__t.begin(), __t.end());
|
||||
return _STD::min_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
||||
// max_element
|
||||
@@ -2268,42 +2230,7 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
_ForwardIterator
|
||||
max_element(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _STD::max_element(__first, __last,
|
||||
__less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
||||
// max
|
||||
|
||||
template <class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
return __comp(__a, __b) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
return _STD::max(__a, __b, __less<_Tp>());
|
||||
}
|
||||
|
||||
template<class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
return *_STD::max_element(__t.begin(), __t.end(), __comp);
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t)
|
||||
{
|
||||
return *_STD::max_element(__t.begin(), __t.end());
|
||||
return _STD::max_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
||||
// minmax_element
|
||||
@@ -2366,45 +2293,6 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last)
|
||||
return _STD::minmax_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
||||
// minmax
|
||||
|
||||
template<class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
pair<const _Tp&, const _Tp&>
|
||||
minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) :
|
||||
pair<const _Tp&, const _Tp&>(__a, __b);
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
pair<const _Tp&, const _Tp&>
|
||||
minmax(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
return _STD::minmax(__a, __b, __less<_Tp>());
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
pair<_Tp, _Tp>
|
||||
minmax(initializer_list<_Tp> __t)
|
||||
{
|
||||
pair<const _Tp*, const _Tp*> __p =
|
||||
_STD::minmax_element(__t.begin(), __t.end());
|
||||
return pair<_Tp, _Tp>(*__p.first, *__p.second);
|
||||
}
|
||||
|
||||
template<class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
pair<_Tp, _Tp>
|
||||
minmax(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
pair<const _Tp*, const _Tp*> __p =
|
||||
_STD::minmax_element(__t.begin(), __t.end(), __comp);
|
||||
return pair<_Tp, _Tp>(*__p.first, *__p.second);
|
||||
}
|
||||
|
||||
// random_shuffle
|
||||
|
||||
// __independent_bits_engine
|
||||
@@ -2693,7 +2581,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
template <class _RandomAccessIterator, class _RandomNumberGenerator>
|
||||
void
|
||||
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
_RandomNumberGenerator&& __rand)
|
||||
#else
|
||||
_RandomNumberGenerator& __rand)
|
||||
@@ -3146,7 +3034,7 @@ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __co
|
||||
return __last;
|
||||
}
|
||||
|
||||
template<class _ForwardIterator>
|
||||
template<class _ForwardIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_ForwardIterator
|
||||
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
|
||||
@@ -3164,7 +3052,7 @@ is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
return _STD::is_sorted_until(__first, __last, __comp) == __last;
|
||||
}
|
||||
|
||||
template<class _ForwardIterator>
|
||||
template<class _ForwardIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
|
||||
@@ -3615,10 +3503,10 @@ sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __com
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__sort<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__sort<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -3712,10 +3600,10 @@ lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __lower_bound<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3760,10 +3648,10 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __upper_bound<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3820,10 +3708,10 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __equal_range<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3855,10 +3743,10 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __binary_search<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3905,10 +3793,10 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return _STD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return _STD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -4080,11 +3968,11 @@ inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return _STD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __c, __len1, __len2,
|
||||
__buf.first, __buf.second);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return _STD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2,
|
||||
__buf.first, __buf.second);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
@@ -4290,10 +4178,10 @@ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4333,7 +4221,7 @@ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
|
||||
return __last;
|
||||
}
|
||||
|
||||
template<class _RandomAccessIterator>
|
||||
template<class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_RandomAccessIterator
|
||||
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
@@ -4351,7 +4239,7 @@ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __
|
||||
return _STD::is_heap_until(__first, __last, __comp) == __last;
|
||||
}
|
||||
|
||||
template<class _RandomAccessIterator>
|
||||
template<class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
@@ -4439,10 +4327,10 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__push_heap_back<_Comp_ref>(__first, __last, __comp, __last - __first);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4477,10 +4365,10 @@ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare _
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4517,10 +4405,10 @@ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__make_heap<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4551,10 +4439,10 @@ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__sort_heap<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4595,10 +4483,10 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__partial_sort<_Comp_ref>(__first, __middle, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4645,10 +4533,10 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator, class _RandomAccessIterator>
|
||||
@@ -4857,10 +4745,10 @@ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomA
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__nth_element<_Comp_ref>(__first, __nth, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4898,10 +4786,10 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
@@ -4951,10 +4839,10 @@ set_union(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5003,10 +4891,10 @@ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5057,10 +4945,10 @@ set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5116,10 +5004,10 @@ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5160,10 +5048,10 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
@@ -5215,15 +5103,15 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __next_permutation<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
bool
|
||||
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
return _STD::next_permutation(__first, __last,
|
||||
@@ -5268,10 +5156,10 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
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_DEBUG
|
||||
#else
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __prev_permutation<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
|
168
include/array
168
include/array
@@ -16,84 +16,84 @@
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <class T, size_t N >
|
||||
template <class T, size_t N >
|
||||
struct array
|
||||
{
|
||||
// types:
|
||||
typedef T & reference;
|
||||
typedef const T & const_reference;
|
||||
typedef implementation defined iterator;
|
||||
typedef implementation defined const_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
{
|
||||
// types:
|
||||
typedef T & reference;
|
||||
typedef const T & const_reference;
|
||||
typedef implementation defined iterator;
|
||||
typedef implementation defined const_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
// No explicit construct/copy/destroy for aggregate type
|
||||
void fill(const T& u);
|
||||
// No explicit construct/copy/destroy for aggregate type
|
||||
void fill(const T& u);
|
||||
void swap(array& a);
|
||||
|
||||
// iterators:
|
||||
iterator begin();
|
||||
const_iterator begin() const;
|
||||
iterator end();
|
||||
const_iterator end() const;
|
||||
// iterators:
|
||||
iterator begin();
|
||||
const_iterator begin() const;
|
||||
iterator end();
|
||||
const_iterator end() const;
|
||||
|
||||
reverse_iterator rbegin();
|
||||
const_reverse_iterator rbegin() const;
|
||||
reverse_iterator rend();
|
||||
const_reverse_iterator rend() const;
|
||||
reverse_iterator rbegin();
|
||||
const_reverse_iterator rbegin() const;
|
||||
reverse_iterator rend();
|
||||
const_reverse_iterator rend() const;
|
||||
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cend() const;
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cend() const;
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const;
|
||||
|
||||
// capacity:
|
||||
constexpr size_type size() const;
|
||||
constexpr size_type max_size() const;
|
||||
bool empty() const;
|
||||
// capacity:
|
||||
constexpr size_type size() const;
|
||||
constexpr size_type max_size() const;
|
||||
bool empty() const;
|
||||
|
||||
// element access:
|
||||
reference operator[](size_type n);
|
||||
const_reference operator[](size_type n) const;
|
||||
const_reference at(size_type n) const;
|
||||
reference at(size_type n);
|
||||
// element access:
|
||||
reference operator[](size_type n);
|
||||
const_reference operator[](size_type n) const;
|
||||
const_reference at(size_type n) const;
|
||||
reference at(size_type n);
|
||||
|
||||
reference front();
|
||||
const_reference front() const;
|
||||
reference back();
|
||||
const_reference back() const;
|
||||
reference front();
|
||||
const_reference front() const;
|
||||
reference back();
|
||||
const_reference back() const;
|
||||
|
||||
T* data();
|
||||
const T* data() const;
|
||||
T* data();
|
||||
const T* data() const;
|
||||
};
|
||||
|
||||
template <class T, size_t N>
|
||||
bool operator==(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator!=(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator<(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator>(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator<=(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator>=(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator==(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator!=(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator<(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator>(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator<=(const array<T,N>& x, const array<T,N>& y);
|
||||
template <class T, size_t N>
|
||||
bool operator>=(const array<T,N>& x, const array<T,N>& y);
|
||||
|
||||
template <class T, size_t N >
|
||||
void swap(array<T,N>& x, array<T,N>& y);
|
||||
template <class T, size_t N >
|
||||
void swap(array<T,N>& x, array<T,N>& y);
|
||||
|
||||
template <class T> class tuple_size;
|
||||
template <int I, class T> class tuple_element;
|
||||
template <class T> class tuple_size;
|
||||
template <int I, class T> class tuple_element;
|
||||
template <class T, size_t N> struct tuple_size<array<T, N>>;
|
||||
template <int I, class T, size_t N> struct tuple_element<I, array<T, N>>;
|
||||
template <int I, class T, size_t N> T& get(array<T, N>&);
|
||||
template <int I, class T, size_t N> const T& get(const array<T, N>&);
|
||||
template <int I, class T, size_t N> struct tuple_element<I, array<T, N>>;
|
||||
template <int I, class T, size_t N> T& get(array<T, N>&);
|
||||
template <int I, class T, size_t N> const T& get(const array<T, N>&);
|
||||
|
||||
} // std
|
||||
|
||||
@@ -114,30 +114,30 @@ template <int I, class T, size_t N> const T& get(const array<T, N>&);
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
struct array
|
||||
{
|
||||
// types:
|
||||
typedef array __self;
|
||||
typedef _Tp value_type;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef _Tp value_type;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
value_type __elems_[_Size > 0 ? _Size : 1];
|
||||
|
||||
// No explicit construct/copy/destroy for aggregate type
|
||||
// No explicit construct/copy/destroy for aggregate type
|
||||
_LIBCPP_INLINE_VISIBILITY void fill(const value_type& __u) {_STD::fill_n(__elems_, _Size, __u);}
|
||||
_LIBCPP_INLINE_VISIBILITY void swap(array& __a) {_STD::swap_ranges(__elems_, __elems_ + _Size, __a.__elems_);}
|
||||
|
||||
// iterators:
|
||||
// iterators:
|
||||
_LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__elems_);}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return const_iterator(__elems_);}
|
||||
_LIBCPP_INLINE_VISIBILITY iterator end() {return iterator(__elems_ + _Size);}
|
||||
@@ -153,16 +153,16 @@ struct array
|
||||
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator crbegin() const {return rbegin();}
|
||||
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator crend() const {return rend();}
|
||||
|
||||
// capacity:
|
||||
// capacity:
|
||||
_LIBCPP_INLINE_VISIBILITY /*constexpr*/ size_type size() const {return _Size;}
|
||||
_LIBCPP_INLINE_VISIBILITY /*constexpr*/ size_type max_size() const {return _Size;}
|
||||
_LIBCPP_INLINE_VISIBILITY bool empty() const {return _Size == 0;}
|
||||
|
||||
// element access:
|
||||
// element access:
|
||||
_LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) {return __elems_[__n];}
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const {return __elems_[__n];}
|
||||
reference at(size_type __n);
|
||||
const_reference at(size_type __n) const;
|
||||
reference at(size_type __n);
|
||||
const_reference at(size_type __n) const;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY reference front() {return __elems_[0];}
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference front() const {return __elems_[0];}
|
||||
@@ -170,10 +170,10 @@ struct array
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference back() const {return __elems_[_Size > 0 ? _Size-1 : 0];}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY value_type* data() {return __elems_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const value_type* data() const {return __elems_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const value_type* data() const {return __elems_;}
|
||||
};
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
typename array<_Tp, _Size>::reference
|
||||
array<_Tp, _Size>::at(size_type __n)
|
||||
{
|
||||
@@ -186,7 +186,7 @@ array<_Tp, _Size>::at(size_type __n)
|
||||
return __elems_[__n];
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
typename array<_Tp, _Size>::const_reference
|
||||
array<_Tp, _Size>::at(size_type __n) const
|
||||
{
|
||||
@@ -199,7 +199,7 @@ array<_Tp, _Size>::at(size_type __n) const
|
||||
return __elems_[__n];
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -207,7 +207,7 @@ operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return _STD::equal(__x.__elems_, __x.__elems_ + _Size, __y.__elems_);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -215,7 +215,7 @@ operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return !(__x == __y);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -223,7 +223,7 @@ operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return _STD::lexicographical_compare(__x.__elems_, __x.__elems_ + _Size, __y.__elems_, __y.__elems_ + _Size);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -231,7 +231,7 @@ operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return __y < __x;
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -239,7 +239,7 @@ operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return !(__y < __x);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
@@ -247,7 +247,7 @@ operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
return !(__x < __y);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Size>
|
||||
template <class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
void
|
||||
swap(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
|
||||
|
@@ -598,61 +598,61 @@ class bitset
|
||||
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
|
||||
typedef __bitset<__n_words, _Size> base;
|
||||
|
||||
public:
|
||||
public:
|
||||
typedef typename base::reference reference;
|
||||
typedef typename base::const_reference const_reference;
|
||||
|
||||
// 23.3.5.1 constructors:
|
||||
// 23.3.5.1 constructors:
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset() {}
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset(unsigned long long __v) : base(__v) {}
|
||||
explicit bitset(const char* __str);
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n =
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n =
|
||||
(basic_string<_CharT,_Traits,_Allocator>::npos),
|
||||
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
|
||||
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
|
||||
|
||||
// 23.3.5.2 bitset operations:
|
||||
// 23.3.5.2 bitset operations:
|
||||
bitset& operator&=(const bitset& __rhs);
|
||||
bitset& operator|=(const bitset& __rhs);
|
||||
bitset& operator^=(const bitset& __rhs);
|
||||
bitset& operator<<=(size_t __pos);
|
||||
bitset& operator>>=(size_t __pos);
|
||||
bitset& set();
|
||||
bitset& set(size_t __pos, bool __val = true);
|
||||
bitset& reset();
|
||||
bitset& reset(size_t __pos);
|
||||
bitset operator~() const;
|
||||
bitset& flip();
|
||||
bitset& flip(size_t __pos);
|
||||
bitset& operator|=(const bitset& __rhs);
|
||||
bitset& operator^=(const bitset& __rhs);
|
||||
bitset& operator<<=(size_t __pos);
|
||||
bitset& operator>>=(size_t __pos);
|
||||
bitset& set();
|
||||
bitset& set(size_t __pos, bool __val = true);
|
||||
bitset& reset();
|
||||
bitset& reset(size_t __pos);
|
||||
bitset operator~() const;
|
||||
bitset& flip();
|
||||
bitset& flip(size_t __pos);
|
||||
|
||||
// element access:
|
||||
// element access:
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
|
||||
_LIBCPP_INLINE_VISIBILITY reference operator[](size_t __p) {return base::__make_ref(__p);}
|
||||
unsigned long to_ulong() const;
|
||||
unsigned long long to_ullong() const;
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
unsigned long to_ulong() const;
|
||||
unsigned long long to_ullong() const;
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'),
|
||||
_CharT __one = _CharT('1')) const;
|
||||
template <class _CharT, class _Traits>
|
||||
_CharT __one = _CharT('1')) const;
|
||||
template <class _CharT, class _Traits>
|
||||
basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
|
||||
_CharT __one = _CharT('1')) const;
|
||||
template <class _CharT>
|
||||
_CharT __one = _CharT('1')) const;
|
||||
template <class _CharT>
|
||||
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
|
||||
_CharT __one = _CharT('1')) const;
|
||||
_CharT __one = _CharT('1')) const;
|
||||
basic_string<char, char_traits<char>, allocator<char> > to_string(char __zero = '0',
|
||||
char __one = '1') const;
|
||||
char __one = '1') const;
|
||||
size_t count() const;
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY size_t size() const {return _Size;}
|
||||
bool operator==(const bitset& __rhs) const;
|
||||
bool operator!=(const bitset& __rhs) const;
|
||||
bool test(size_t __pos) const;
|
||||
bool all() const;
|
||||
bool any() const;
|
||||
bool operator==(const bitset& __rhs) const;
|
||||
bool operator!=(const bitset& __rhs) const;
|
||||
bool test(size_t __pos) const;
|
||||
bool all() const;
|
||||
bool any() const;
|
||||
_LIBCPP_INLINE_VISIBILITY bool none() const {return !any();}
|
||||
bitset operator<<(size_t __pos) const;
|
||||
bitset operator>>(size_t __pos) const;
|
||||
bitset operator<<(size_t __pos) const;
|
||||
bitset operator>>(size_t __pos) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -690,9 +690,9 @@ bitset<_Size>::bitset(const char* __str)
|
||||
}
|
||||
|
||||
template <size_t _Size>
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos,
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos,
|
||||
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n,
|
||||
_CharT __zero, _CharT __one)
|
||||
{
|
||||
@@ -867,7 +867,7 @@ bitset<_Size>::to_ullong() const
|
||||
}
|
||||
|
||||
template <size_t _Size>
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>
|
||||
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
|
||||
{
|
||||
@@ -881,7 +881,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
|
||||
}
|
||||
|
||||
template <size_t _Size>
|
||||
template <class _CharT, class _Traits>
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<_CharT, _Traits, allocator<_CharT> >
|
||||
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
|
||||
@@ -890,7 +890,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
|
||||
}
|
||||
|
||||
template <size_t _Size>
|
||||
template <class _CharT>
|
||||
template <class _CharT>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
|
||||
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
|
||||
|
@@ -44,14 +44,14 @@ const int __elast2 = ELAST+2;
|
||||
#define ENOTRECOVERABLE __elast1
|
||||
#define ELAST ENOTRECOVERABLE
|
||||
|
||||
#else // defined(EOWNERDEAD)
|
||||
#else
|
||||
|
||||
#define EOWNERDEAD __elast1
|
||||
#define ENOTRECOVERABLE __elast2
|
||||
#define ELAST ENOTRECOVERABLE
|
||||
|
||||
#endif // defined(EOWNERDEAD)
|
||||
#endif
|
||||
|
||||
#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CERRNO
|
||||
|
@@ -141,17 +141,17 @@ bool signbit(floating_point x);
|
||||
|
||||
int fpclassify(floating_point x);
|
||||
|
||||
bool isfinite(floating_point x);
|
||||
bool isinf(floating_point x);
|
||||
bool isnan(floating_point x);
|
||||
bool isnormal(floating_point x);
|
||||
bool isfinite(floating_point x);
|
||||
bool isinf(floating_point x);
|
||||
bool isnan(floating_point x);
|
||||
bool isnormal(floating_point x);
|
||||
|
||||
bool isgreater(floating_point x, floating_point y);
|
||||
bool isgreaterequal(floating_point x, floating_point y);
|
||||
bool isless(floating_point x, floating_point y);
|
||||
bool islessequal(floating_point x, floating_point y);
|
||||
bool islessgreater(floating_point x, floating_point y);
|
||||
bool isunordered(floating_point x, floating_point y);
|
||||
bool isgreater(floating_point x, floating_point y);
|
||||
bool isgreaterequal(floating_point x, floating_point y);
|
||||
bool isless(floating_point x, floating_point y);
|
||||
bool islessequal(floating_point x, floating_point y);
|
||||
bool islessgreater(floating_point x, floating_point y);
|
||||
bool isunordered(floating_point x, floating_point y);
|
||||
|
||||
floating_point acosh (arithmetic x);
|
||||
float acoshf(float x);
|
||||
@@ -297,12 +297,6 @@ long double truncl(long double x);
|
||||
|
||||
*/
|
||||
|
||||
// FIXME: work around for Clang with -std=C++0x on OSX/iOS
|
||||
#if defined(__clang__) && defined(__APPLE__)
|
||||
# pragma push_macro("__STRICT_ANSI__")
|
||||
# undef __STRICT_ANSI__
|
||||
#endif // defined(__clang__) && defined(__APPLE__)
|
||||
|
||||
#include <__config>
|
||||
#include <math.h>
|
||||
#include <type_traits>
|
||||
@@ -1647,9 +1641,4 @@ using ::truncl;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
// FIXME: work around for Clang with -std=C++0x on OSX/iOS
|
||||
#if defined(__clang__) && defined(__APPLE__)
|
||||
# pragma pop_macro("__STRICT_ANSI__")
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CMATH
|
||||
|
136
include/complex
136
include/complex
@@ -49,89 +49,89 @@ public:
|
||||
|
||||
template<>
|
||||
class complex<float>
|
||||
{
|
||||
public:
|
||||
typedef float value_type;
|
||||
{
|
||||
public:
|
||||
typedef float value_type;
|
||||
|
||||
constexpr complex(float re = 0.0f, float im = 0.0f);
|
||||
explicit constexpr complex(const complex<double>&);
|
||||
explicit constexpr complex(const complex<long double>&);
|
||||
constexpr complex(float re = 0.0f, float im = 0.0f);
|
||||
explicit constexpr complex(const complex<double>&);
|
||||
explicit constexpr complex(const complex<long double>&);
|
||||
|
||||
constexpr float real() const;
|
||||
constexpr float real() const;
|
||||
void real(float);
|
||||
constexpr float imag() const;
|
||||
constexpr float imag() const;
|
||||
void imag(float);
|
||||
|
||||
complex<float>& operator= (float);
|
||||
complex<float>& operator+=(float);
|
||||
complex<float>& operator-=(float);
|
||||
complex<float>& operator*=(float);
|
||||
complex<float>& operator/=(float);
|
||||
complex<float>& operator= (float);
|
||||
complex<float>& operator+=(float);
|
||||
complex<float>& operator-=(float);
|
||||
complex<float>& operator*=(float);
|
||||
complex<float>& operator/=(float);
|
||||
|
||||
complex<float>& operator=(const complex<float>&);
|
||||
template<class X> complex<float>& operator= (const complex<X>&);
|
||||
template<class X> complex<float>& operator+=(const complex<X>&);
|
||||
template<class X> complex<float>& operator-=(const complex<X>&);
|
||||
template<class X> complex<float>& operator*=(const complex<X>&);
|
||||
template<class X> complex<float>& operator/=(const complex<X>&);
|
||||
complex<float>& operator=(const complex<float>&);
|
||||
template<class X> complex<float>& operator= (const complex<X>&);
|
||||
template<class X> complex<float>& operator+=(const complex<X>&);
|
||||
template<class X> complex<float>& operator-=(const complex<X>&);
|
||||
template<class X> complex<float>& operator*=(const complex<X>&);
|
||||
template<class X> complex<float>& operator/=(const complex<X>&);
|
||||
};
|
||||
|
||||
template<>
|
||||
class complex<double>
|
||||
{
|
||||
public:
|
||||
typedef double value_type;
|
||||
{
|
||||
public:
|
||||
typedef double value_type;
|
||||
|
||||
constexpr complex(double re = 0.0, double im = 0.0);
|
||||
constexpr complex(const complex<float>&);
|
||||
explicit constexpr complex(const complex<long double>&);
|
||||
constexpr complex(double re = 0.0, double im = 0.0);
|
||||
constexpr complex(const complex<float>&);
|
||||
explicit constexpr complex(const complex<long double>&);
|
||||
|
||||
constexpr double real() const;
|
||||
constexpr double real() const;
|
||||
void real(double);
|
||||
constexpr double imag() const;
|
||||
constexpr double imag() const;
|
||||
void imag(double);
|
||||
|
||||
complex<double>& operator= (double);
|
||||
complex<double>& operator+=(double);
|
||||
complex<double>& operator-=(double);
|
||||
complex<double>& operator*=(double);
|
||||
complex<double>& operator/=(double);
|
||||
complex<double>& operator=(const complex<double>&);
|
||||
complex<double>& operator= (double);
|
||||
complex<double>& operator+=(double);
|
||||
complex<double>& operator-=(double);
|
||||
complex<double>& operator*=(double);
|
||||
complex<double>& operator/=(double);
|
||||
complex<double>& operator=(const complex<double>&);
|
||||
|
||||
template<class X> complex<double>& operator= (const complex<X>&);
|
||||
template<class X> complex<double>& operator+=(const complex<X>&);
|
||||
template<class X> complex<double>& operator-=(const complex<X>&);
|
||||
template<class X> complex<double>& operator*=(const complex<X>&);
|
||||
template<class X> complex<double>& operator/=(const complex<X>&);
|
||||
};
|
||||
template<class X> complex<double>& operator= (const complex<X>&);
|
||||
template<class X> complex<double>& operator+=(const complex<X>&);
|
||||
template<class X> complex<double>& operator-=(const complex<X>&);
|
||||
template<class X> complex<double>& operator*=(const complex<X>&);
|
||||
template<class X> complex<double>& operator/=(const complex<X>&);
|
||||
};
|
||||
|
||||
template<>
|
||||
class complex<long double>
|
||||
{
|
||||
public:
|
||||
typedef long double value_type;
|
||||
{
|
||||
public:
|
||||
typedef long double value_type;
|
||||
|
||||
constexpr complex(long double re = 0.0L, long double im = 0.0L);
|
||||
constexpr complex(const complex<float>&);
|
||||
constexpr complex(const complex<double>&);
|
||||
constexpr complex(long double re = 0.0L, long double im = 0.0L);
|
||||
constexpr complex(const complex<float>&);
|
||||
constexpr complex(const complex<double>&);
|
||||
|
||||
constexpr long double real() const;
|
||||
constexpr long double real() const;
|
||||
void real(long double);
|
||||
constexpr long double imag() const;
|
||||
constexpr long double imag() const;
|
||||
void imag(long double);
|
||||
|
||||
complex<long double>& operator=(const complex<long double>&);
|
||||
complex<long double>& operator= (long double);
|
||||
complex<long double>& operator+=(long double);
|
||||
complex<long double>& operator-=(long double);
|
||||
complex<long double>& operator*=(long double);
|
||||
complex<long double>& operator/=(long double);
|
||||
complex<long double>& operator=(const complex<long double>&);
|
||||
complex<long double>& operator= (long double);
|
||||
complex<long double>& operator+=(long double);
|
||||
complex<long double>& operator-=(long double);
|
||||
complex<long double>& operator*=(long double);
|
||||
complex<long double>& operator/=(long double);
|
||||
|
||||
template<class X> complex<long double>& operator= (const complex<X>&);
|
||||
template<class X> complex<long double>& operator+=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator-=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator*=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator/=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator= (const complex<X>&);
|
||||
template<class X> complex<long double>& operator+=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator-=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator*=(const complex<X>&);
|
||||
template<class X> complex<long double>& operator/=(const complex<X>&);
|
||||
};
|
||||
|
||||
// 26.3.6 operators:
|
||||
@@ -321,11 +321,11 @@ template<> class complex<long double>;
|
||||
|
||||
template<>
|
||||
class complex<float>
|
||||
{
|
||||
{
|
||||
float __re_;
|
||||
float __im_;
|
||||
public:
|
||||
typedef float value_type;
|
||||
public:
|
||||
typedef float value_type;
|
||||
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(float __re = 0.0f, float __im = 0.0f)
|
||||
: __re_(__re), __im_(__im) {}
|
||||
@@ -376,11 +376,11 @@ public:
|
||||
|
||||
template<>
|
||||
class complex<double>
|
||||
{
|
||||
{
|
||||
double __re_;
|
||||
double __im_;
|
||||
public:
|
||||
typedef double value_type;
|
||||
public:
|
||||
typedef double value_type;
|
||||
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(double __re = 0.0, double __im = 0.0)
|
||||
: __re_(__re), __im_(__im) {}
|
||||
@@ -427,15 +427,15 @@ public:
|
||||
*this = *this / __c;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
class complex<long double>
|
||||
{
|
||||
{
|
||||
long double __re_;
|
||||
long double __im_;
|
||||
public:
|
||||
typedef long double value_type;
|
||||
public:
|
||||
typedef long double value_type;
|
||||
|
||||
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(long double __re = 0.0L, long double __im = 0.0L)
|
||||
: __re_(__re), __im_(__im) {}
|
||||
|
@@ -18,16 +18,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <ccomplex>
|
||||
|
||||
#else // __cplusplus
|
||||
|
||||
#include_next <complex.h>
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#endif // _LIBCPP_COMPLEX_H
|
||||
|
@@ -61,8 +61,6 @@ public:
|
||||
native_handle_type native_handle();
|
||||
};
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
||||
|
||||
class condition_variable_any
|
||||
{
|
||||
public:
|
||||
@@ -246,8 +244,6 @@ condition_variable_any::wait_for(_Lock& __lock,
|
||||
_STD::move(__pred));
|
||||
}
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CONDITION_VARIABLE
|
||||
|
@@ -25,7 +25,7 @@ Macros:
|
||||
SIGINT
|
||||
SIGSEGV
|
||||
SIGTERM
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
|
@@ -20,7 +20,7 @@ Macros:
|
||||
void va_copy(va_list dest, va_list src); // C99
|
||||
void va_end(va_list ap);
|
||||
void va_start(va_list ap, parmN);
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
|
@@ -18,7 +18,7 @@ Macros:
|
||||
|
||||
offsetof(type,member-designator)
|
||||
NULL
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ Types:
|
||||
#define __need_NULL
|
||||
#define __need_ptrdiff_t
|
||||
#define __need_size_t
|
||||
#endif // __GLIBC__
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -65,11 +65,11 @@ struct nullptr_t
|
||||
_LIBCPP_ALWAYS_INLINE operator int __nat::*() const {return 0;}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
operator _Tp* () const {return 0;}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
operator _Tp _Up::* () const {return 0;}
|
||||
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator==(nullptr_t, nullptr_t) {return true;}
|
||||
@@ -78,53 +78,17 @@ struct nullptr_t
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator<=(nullptr_t, nullptr_t) {return true;}
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>(nullptr_t, nullptr_t) {return false;}
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>=(nullptr_t, nullptr_t) {return true;}
|
||||
|
||||
template <typename _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator==(nullptr_t, _Tp* __p) {return 0 == __p;}
|
||||
|
||||
template <typename _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator==(_Tp* __p, nullptr_t) {return __p == 0;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator!=(nullptr_t, _Tp* __p) {return 0 != __p;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator!=(_Tp* __p, nullptr_t) {return __p != 0;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator<(nullptr_t, _Tp* __p) {return 0 < __p;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator<(_Tp* __p, nullptr_t) {return __p < 0;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator<=(nullptr_t, _Tp* __p) {return 0 <= __p;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator<=(_Tp* __p, nullptr_t) {return __p <= 0;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>(nullptr_t, _Tp* __p) {return 0 > __p;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>(_Tp* __p, nullptr_t) {return __p > 0;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>=(nullptr_t, _Tp* __p) {return 0 >= __p;}
|
||||
|
||||
template <class _Tp>
|
||||
friend _LIBCPP_ALWAYS_INLINE bool operator>=(_Tp* __p, nullptr_t) {return __p >= 0;}
|
||||
};
|
||||
|
||||
inline _LIBCPP_ALWAYS_INLINE nullptr_t __get_nullptr_t() {return nullptr_t(0);}
|
||||
|
||||
#define nullptr _STD::__get_nullptr_t()
|
||||
|
||||
#else // _LIBCPP_HAS_NO_NULLPTR
|
||||
#else
|
||||
|
||||
typedef decltype(nullptr) nullptr_t;
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_NULLPTR
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -21,7 +21,7 @@ Macros:
|
||||
MB_CUR_MAX
|
||||
NULL
|
||||
RAND_MAX
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ long labs( long j);
|
||||
long long llabs(long long j); // C99
|
||||
div_t div( int numer, int denom);
|
||||
ldiv_t div( long numer, long denom);
|
||||
lldiv_t div(long long numer, long long denom); // C++0X
|
||||
lldiv_t div(long long numer, long long denom); // C++0X
|
||||
ldiv_t ldiv( long numer, long denom);
|
||||
lldiv_t lldiv(long long numer, long long denom); // C99
|
||||
int mblen(const char* s, size_t n);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
Macros:
|
||||
|
||||
NULL
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -77,23 +77,23 @@ using ::strncmp;
|
||||
using ::strcoll;
|
||||
using ::strxfrm;
|
||||
|
||||
using ::memchr;
|
||||
inline _LIBCPP_INLINE_VISIBILITY const void* memchr(const void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
|
||||
|
||||
using ::strchr;
|
||||
inline _LIBCPP_INLINE_VISIBILITY const char* strchr(const char* __s, int __c) {return ::strchr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
|
||||
|
||||
using ::strcspn;
|
||||
|
||||
using ::strpbrk;
|
||||
inline _LIBCPP_INLINE_VISIBILITY const char* strpbrk(const char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
|
||||
|
||||
using ::strrchr;
|
||||
inline _LIBCPP_INLINE_VISIBILITY const char* strrchr(const char* __s, int __c) {return ::strrchr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
|
||||
|
||||
using ::strspn;
|
||||
|
||||
using ::strstr;
|
||||
inline _LIBCPP_INLINE_VISIBILITY const char* strstr(const char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY char* strstr( char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
|
||||
|
||||
using ::strtok;
|
||||
|
@@ -18,7 +18,7 @@ Macros:
|
||||
|
||||
NULL
|
||||
CLOCKS_PER_SEC
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
|
@@ -20,7 +20,7 @@ Macros:
|
||||
WCHAR_MAX
|
||||
WCHAR_MIN
|
||||
WEOF
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ wint_t fputwc(wchar_t c, FILE* stream);
|
||||
int fputws(const wchar_t* restrict s, FILE* restrict stream);
|
||||
int fwide(FILE* stream, int mode);
|
||||
wint_t getwc(FILE* stream);
|
||||
wint_t getwchar();
|
||||
wint_t getwchar();
|
||||
wint_t putwc(wchar_t c, FILE* stream);
|
||||
wint_t putwchar(wchar_t c);
|
||||
wint_t ungetwc(wint_t c, FILE* stream);
|
||||
@@ -92,10 +92,10 @@ wint_t btowc(int c);
|
||||
int wctob(wint_t c);
|
||||
int mbsinit(const mbstate_t* ps);
|
||||
size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
|
||||
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
|
||||
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
|
||||
size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
|
||||
size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
|
||||
mbstate_t* restrict ps);
|
||||
mbstate_t* restrict ps);
|
||||
size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
|
||||
mbstate_t* restrict ps);
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
Macros:
|
||||
|
||||
WEOF
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ using ::wctype_t;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalnum(wint_t __wc) {return iswalnum(__wc);}
|
||||
#undef iswalnum
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswalnum(wint_t __wc) {return __libcpp_iswalnum(__wc);}
|
||||
#else // iswalnum
|
||||
#else
|
||||
using ::iswalnum;
|
||||
#endif
|
||||
|
||||
@@ -74,7 +74,7 @@ using ::iswalnum;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalpha(wint_t __wc) {return iswalpha(__wc);}
|
||||
#undef iswalpha
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswalpha(wint_t __wc) {return __libcpp_iswalpha(__wc);}
|
||||
#else // iswalpha
|
||||
#else
|
||||
using ::iswalpha;
|
||||
#endif
|
||||
|
||||
@@ -82,7 +82,7 @@ using ::iswalpha;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswblank(wint_t __wc) {return iswblank(__wc);}
|
||||
#undef iswblank
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswblank(wint_t __wc) {return __libcpp_iswblank(__wc);}
|
||||
#else // iswblank
|
||||
#else
|
||||
using ::iswblank;
|
||||
#endif
|
||||
|
||||
@@ -90,7 +90,7 @@ using ::iswblank;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswcntrl(wint_t __wc) {return iswcntrl(__wc);}
|
||||
#undef iswcntrl
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswcntrl(wint_t __wc) {return __libcpp_iswcntrl(__wc);}
|
||||
#else // iswcntrl
|
||||
#else
|
||||
using ::iswcntrl;
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ using ::iswcntrl;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswdigit(wint_t __wc) {return iswdigit(__wc);}
|
||||
#undef iswdigit
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswdigit(wint_t __wc) {return __libcpp_iswdigit(__wc);}
|
||||
#else // iswdigit
|
||||
#else
|
||||
using ::iswdigit;
|
||||
#endif
|
||||
|
||||
@@ -106,7 +106,7 @@ using ::iswdigit;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswgraph(wint_t __wc) {return iswgraph(__wc);}
|
||||
#undef iswgraph
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswgraph(wint_t __wc) {return __libcpp_iswgraph(__wc);}
|
||||
#else // iswgraph
|
||||
#else
|
||||
using ::iswgraph;
|
||||
#endif
|
||||
|
||||
@@ -114,7 +114,7 @@ using ::iswgraph;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswlower(wint_t __wc) {return iswlower(__wc);}
|
||||
#undef iswlower
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswlower(wint_t __wc) {return __libcpp_iswlower(__wc);}
|
||||
#else // iswlower
|
||||
#else
|
||||
using ::iswlower;
|
||||
#endif
|
||||
|
||||
@@ -122,7 +122,7 @@ using ::iswlower;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswprint(wint_t __wc) {return iswprint(__wc);}
|
||||
#undef iswprint
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswprint(wint_t __wc) {return __libcpp_iswprint(__wc);}
|
||||
#else // iswprint
|
||||
#else
|
||||
using ::iswprint;
|
||||
#endif
|
||||
|
||||
@@ -130,7 +130,7 @@ using ::iswprint;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswpunct(wint_t __wc) {return iswpunct(__wc);}
|
||||
#undef iswpunct
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswpunct(wint_t __wc) {return __libcpp_iswpunct(__wc);}
|
||||
#else // iswpunct
|
||||
#else
|
||||
using ::iswpunct;
|
||||
#endif
|
||||
|
||||
@@ -138,7 +138,7 @@ using ::iswpunct;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswspace(wint_t __wc) {return iswspace(__wc);}
|
||||
#undef iswspace
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswspace(wint_t __wc) {return __libcpp_iswspace(__wc);}
|
||||
#else // iswspace
|
||||
#else
|
||||
using ::iswspace;
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ using ::iswspace;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswupper(wint_t __wc) {return iswupper(__wc);}
|
||||
#undef iswupper
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswupper(wint_t __wc) {return __libcpp_iswupper(__wc);}
|
||||
#else // iswupper
|
||||
#else
|
||||
using ::iswupper;
|
||||
#endif
|
||||
|
||||
@@ -154,7 +154,7 @@ using ::iswupper;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswxdigit(wint_t __wc) {return iswxdigit(__wc);}
|
||||
#undef iswxdigit
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswxdigit(wint_t __wc) {return __libcpp_iswxdigit(__wc);}
|
||||
#else // iswxdigit
|
||||
#else
|
||||
using ::iswxdigit;
|
||||
#endif
|
||||
|
||||
@@ -162,7 +162,7 @@ using ::iswxdigit;
|
||||
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswctype(wint_t __w, wctype_t __d) {return iswctype(__w, __d);}
|
||||
#undef iswctype
|
||||
inline _LIBCPP_INLINE_VISIBILITY int iswctype(wint_t __w, wctype_t __d) {return __libcpp_iswctype(__w, __d);}
|
||||
#else // iswctype
|
||||
#else
|
||||
using ::iswctype;
|
||||
#endif
|
||||
|
||||
@@ -170,7 +170,7 @@ using ::iswctype;
|
||||
inline _LIBCPP_INLINE_VISIBILITY wctype_t __libcpp_wctype(const char* __p) {return wctype(__p);}
|
||||
#undef wctype
|
||||
inline _LIBCPP_INLINE_VISIBILITY wctype_t wctype(const char* __p) {return __libcpp_wctype(__p);}
|
||||
#else // wctype
|
||||
#else
|
||||
using ::wctype;
|
||||
#endif
|
||||
|
||||
@@ -178,7 +178,7 @@ using ::wctype;
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towlower(wint_t __wc) {return towlower(__wc);}
|
||||
#undef towlower
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t towlower(wint_t __wc) {return __libcpp_towlower(__wc);}
|
||||
#else // towlower
|
||||
#else
|
||||
using ::towlower;
|
||||
#endif
|
||||
|
||||
@@ -186,7 +186,7 @@ using ::towlower;
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towupper(wint_t __wc) {return towupper(__wc);}
|
||||
#undef towupper
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t towupper(wint_t __wc) {return __libcpp_towupper(__wc);}
|
||||
#else // towupper
|
||||
#else
|
||||
using ::towupper;
|
||||
#endif
|
||||
|
||||
@@ -194,7 +194,7 @@ using ::towupper;
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towctrans(wint_t __wc, wctype_t __d) {return towctrans(__wc, __d);}
|
||||
#undef towctrans
|
||||
inline _LIBCPP_INLINE_VISIBILITY wint_t towctrans(wint_t __wc, wctype_t __d) {return __libcpp_towctrans(__wc, __d);}
|
||||
#else // towctrans
|
||||
#else
|
||||
using ::towctrans;
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ using ::towctrans;
|
||||
inline _LIBCPP_INLINE_VISIBILITY wctrans_t __libcpp_wctrans(const char* __p) {return wctrans(__p);}
|
||||
#undef wctrans
|
||||
inline _LIBCPP_INLINE_VISIBILITY wctrans_t wctrans(const char* __p) {return __libcpp_wctrans(__p);}
|
||||
#else // wctrans
|
||||
#else
|
||||
using ::wctrans;
|
||||
#endif
|
||||
|
||||
|
@@ -332,19 +332,19 @@ public:
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(difference_type __n)
|
||||
{
|
||||
return *this += -__n;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(difference_type __n) const
|
||||
{
|
||||
__deque_iterator __t(*this);
|
||||
__t += __n;
|
||||
return __t;
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(difference_type __n) const
|
||||
{
|
||||
__deque_iterator __t(*this);
|
||||
@@ -398,6 +398,7 @@ private:
|
||||
_LIBCPP_INLINE_VISIBILITY __deque_iterator(__map_iterator __m, pointer __p)
|
||||
: __m_iter_(__m), __ptr_(__p) {}
|
||||
|
||||
|
||||
template <class _Tp, class _A> friend class __deque_base;
|
||||
template <class _Tp, class _A> friend class deque;
|
||||
template <class _V, class _P, class _R, class _MP, class _D, _D>
|
||||
@@ -930,12 +931,12 @@ protected:
|
||||
explicit __deque_base(const allocator_type& __a);
|
||||
~__deque_base();
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
__deque_base(__deque_base&& __c);
|
||||
__deque_base(__deque_base&& __c, const allocator_type& __a);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void swap(__deque_base& __c);
|
||||
void clear();
|
||||
|
||||
@@ -1059,7 +1060,7 @@ __deque_base<_Tp, _Allocator>::~__deque_base()
|
||||
__alloc_traits::deallocate(__alloc(), *__i, __block_size);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
|
||||
@@ -1090,7 +1091,7 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1132,7 +1133,7 @@ class deque
|
||||
{
|
||||
public:
|
||||
// types:
|
||||
|
||||
|
||||
typedef _Tp value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
|
||||
@@ -1171,11 +1172,11 @@ public:
|
||||
deque& operator=(const deque& __c);
|
||||
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
deque(deque&& __c);
|
||||
deque(deque&& __c, const allocator_type& __a);
|
||||
deque& operator=(deque&& __c);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _InputIter>
|
||||
void assign(_InputIter __f, _InputIter __l,
|
||||
@@ -1227,16 +1228,14 @@ public:
|
||||
// 23.2.2.3 modifiers:
|
||||
void push_front(const value_type& __v);
|
||||
void push_back(const value_type& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args> void emplace_front(_Args&&... __args);
|
||||
template <class... _Args> void emplace_back(_Args&&... __args);
|
||||
template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
void push_front(value_type&& __v);
|
||||
void push_back(value_type&& __v);
|
||||
iterator insert(const_iterator __p, value_type&& __v);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __v);
|
||||
iterator insert(const_iterator __p, size_type __n, const value_type& __v);
|
||||
template <class _InputIter>
|
||||
@@ -1398,7 +1397,7 @@ deque<_Tp, _Allocator>::operator=(const deque& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
@@ -1451,7 +1450,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
|
||||
__base::__move_assign(__c);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _InputIter>
|
||||
@@ -1647,7 +1646,7 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1661,8 +1660,6 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1676,8 +1673,7 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1692,7 +1688,7 @@ deque<_Tp, _Allocator>::push_front(const value_type& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1707,8 +1703,6 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1723,8 +1717,7 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1787,7 +1780,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1844,8 +1837,6 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1902,8 +1893,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -2144,7 +2134,7 @@ deque<_Tp, _Allocator>::__add_front_capacity()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
@@ -2153,7 +2143,7 @@ deque<_Tp, _Allocator>::__add_front_capacity()
|
||||
__alloc_traits::deallocate(__a, __buf.front(), __base::__block_size);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (typename __base::__map_pointer __i = __base::__map_.begin();
|
||||
__i != __base::__map_.end(); ++__i)
|
||||
__buf.push_back(*__i);
|
||||
@@ -2223,7 +2213,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __nb > 0; --__nb)
|
||||
__buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2235,7 +2225,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
|
||||
__alloc_traits::deallocate(__a, *__i, __base::__block_size);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __back_capacity > 0; --__back_capacity)
|
||||
{
|
||||
__buf.push_back(__base::__map_.back());
|
||||
@@ -2292,7 +2282,7 @@ deque<_Tp, _Allocator>::__add_back_capacity()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
@@ -2301,7 +2291,7 @@ deque<_Tp, _Allocator>::__add_back_capacity()
|
||||
__alloc_traits::deallocate(__a, __buf.back(), __base::__block_size);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (typename __base::__map_pointer __i = __base::__map_.end();
|
||||
__i != __base::__map_.begin();)
|
||||
__buf.push_front(*--__i);
|
||||
@@ -2370,7 +2360,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __nb > 0; --__nb)
|
||||
__buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2382,7 +2372,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
|
||||
__alloc_traits::deallocate(__a, *__i, __base::__block_size);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __front_capacity > 0; --__front_capacity)
|
||||
{
|
||||
__buf.push_back(__base::__map_.front());
|
||||
|
@@ -141,7 +141,6 @@ template<class _E>
|
||||
exception_ptr
|
||||
make_exception_ptr(_E __e)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
throw __e;
|
||||
@@ -150,7 +149,6 @@ make_exception_ptr(_E __e)
|
||||
{
|
||||
return current_exception();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
// nested_exception
|
||||
@@ -178,39 +176,35 @@ struct __nested
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void
|
||||
#ifdef _LIBCPP_MOVE
|
||||
throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if<
|
||||
is_class<typename remove_reference<_Tp>::type>::value &&
|
||||
!is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
|
||||
>::type* = 0)
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
throw_with_nested (_Tp& __t, typename enable_if<
|
||||
is_class<_Tp>::value && !is_base_of<nested_exception, _Tp>::value
|
||||
>::type* = 0)
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
|
||||
#endif
|
||||
{
|
||||
throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void
|
||||
#ifdef _LIBCPP_MOVE
|
||||
throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if<
|
||||
!is_class<typename remove_reference<_Tp>::type>::value ||
|
||||
is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
|
||||
>::type* = 0)
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
throw_with_nested (_Tp& __t, typename enable_if<
|
||||
!is_class<_Tp>::value || is_base_of<nested_exception, _Tp>::value
|
||||
>::type* = 0)
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw _STD::forward<_Tp>(__t);
|
||||
#endif
|
||||
{
|
||||
throw _STD::forward<_Tp>(__t);
|
||||
}
|
||||
|
||||
template <class _E>
|
||||
|
@@ -254,7 +254,7 @@ public:
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y.first);}
|
||||
bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x.first, __y);}
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y);}
|
||||
};
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
{
|
||||
const_cast<bool&>(__x.__value_constructed) = false;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
|
@@ -97,8 +97,8 @@ public:
|
||||
InputIterator first, InputIterator last);
|
||||
iterator insert_after(const_iterator p, initializer_list<value_type> il);
|
||||
|
||||
iterator erase_after(const_iterator p);
|
||||
iterator erase_after(const_iterator first, const_iterator last);
|
||||
void erase_after(const_iterator p);
|
||||
void erase_after(const_iterator first, const_iterator last);
|
||||
|
||||
void swap(forward_list& x);
|
||||
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
typedef typename pointer_traits<__node_pointer>::element_type::value_type
|
||||
value_type;
|
||||
typedef value_type& reference;
|
||||
typedef typename pointer_traits<__node_pointer>::difference_type
|
||||
typedef typename pointer_traits<__node_pointer>::difference_type
|
||||
difference_type;
|
||||
typedef typename pointer_traits<__node_pointer>::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
typedef forward_iterator_tag iterator_category;
|
||||
typedef typename __node::value_type value_type;
|
||||
typedef const value_type& reference;
|
||||
typedef typename pointer_traits<__node_const_pointer>::difference_type
|
||||
typedef typename pointer_traits<__node_const_pointer>::difference_type
|
||||
difference_type;
|
||||
typedef typename pointer_traits<__node_const_pointer>::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
@@ -355,10 +355,10 @@ protected:
|
||||
__forward_list_base(const allocator_type& __a)
|
||||
: __before_begin_(__begin_node(), __node_allocator(__a)) {}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__forward_list_base(__forward_list_base&& __x);
|
||||
__forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
private:
|
||||
__forward_list_base(const __forward_list_base&);
|
||||
@@ -405,7 +405,7 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -428,7 +428,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
__forward_list_base<_Tp, _Alloc>::~__forward_list_base()
|
||||
@@ -498,17 +498,17 @@ public:
|
||||
>::type* = nullptr);
|
||||
forward_list(const forward_list& __x);
|
||||
forward_list(const forward_list& __x, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list(forward_list&& __x) : base(_STD::move(__x)) {}
|
||||
forward_list(forward_list&& __x, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
forward_list(initializer_list<value_type> __il);
|
||||
forward_list(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
// ~forward_list() = default;
|
||||
|
||||
forward_list& operator=(const forward_list& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list& operator=(forward_list&& __x);
|
||||
#endif
|
||||
forward_list& operator=(initializer_list<value_type> __il);
|
||||
@@ -543,23 +543,19 @@ public:
|
||||
reference front() {return base::__before_begin()->__next_->__value_;}
|
||||
const_reference front() const {return base::__before_begin()->__next_->__value_;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args> void emplace_front(_Args&&... __args);
|
||||
#endif
|
||||
void push_front(value_type&& __v);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void push_front(const value_type& __v);
|
||||
|
||||
void pop_front();
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
iterator emplace_after(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
iterator insert_after(const_iterator __p, value_type&& __v);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert_after(const_iterator __p, const value_type& __v);
|
||||
iterator insert_after(const_iterator __p, size_type __n, const value_type& __v);
|
||||
template <class _InputIterator>
|
||||
@@ -572,8 +568,8 @@ public:
|
||||
iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
|
||||
{return insert_after(__p, __il.begin(), __il.end());}
|
||||
|
||||
iterator erase_after(const_iterator __p);
|
||||
iterator erase_after(const_iterator __f, const_iterator __l);
|
||||
void erase_after(const_iterator __p);
|
||||
void erase_after(const_iterator __f, const_iterator __l);
|
||||
|
||||
void swap(forward_list& __x) {base::swap(__x);}
|
||||
|
||||
@@ -581,28 +577,28 @@ public:
|
||||
void resize(size_type __n, const value_type& __v);
|
||||
void clear() {base::clear();}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void splice_after(const_iterator __p, forward_list&& __x);
|
||||
void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i);
|
||||
void splice_after(const_iterator __p, forward_list&& __x,
|
||||
const_iterator __f, const_iterator __l);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
void splice_after(const_iterator __p, forward_list& __x);
|
||||
void splice_after(const_iterator __p, forward_list& __x, const_iterator __i);
|
||||
void splice_after(const_iterator __p, forward_list& __x,
|
||||
const_iterator __f, const_iterator __l);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void remove(const value_type& __v);
|
||||
template <class _Predicate> void remove_if(_Predicate __pred);
|
||||
void unique() {unique(__equal_to<value_type>());}
|
||||
template <class _BinaryPredicate> void unique(_BinaryPredicate __binary_pred);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void merge(forward_list&& __x) {merge(_STD::move(__x), __less<value_type>());}
|
||||
template <class _Compare> void merge(forward_list&& __x, _Compare __comp);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
void merge(forward_list& __x) {merge(__x, __less<value_type>());}
|
||||
template <class _Compare> void merge(forward_list& __x, _Compare __comp);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void sort() {sort(__less<value_type>());}
|
||||
template <class _Compare> void sort(_Compare __comp);
|
||||
void reverse();
|
||||
@@ -613,10 +609,10 @@ private:
|
||||
typedef typename base::__node_traits __node_traits;
|
||||
typedef typename base::__node_pointer __node_pointer;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void __move_assign(forward_list& __x, true_type);
|
||||
void __move_assign(forward_list& __x, false_type);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Compare>
|
||||
static
|
||||
@@ -709,7 +705,7 @@ forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x,
|
||||
insert_after(cbefore_begin(), __x.begin(), __x.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
|
||||
@@ -723,7 +719,7 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il)
|
||||
@@ -751,7 +747,7 @@ forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -786,7 +782,7 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -840,8 +836,7 @@ forward_list<_Tp, _Alloc>::assign(initializer_list<value_type> __il)
|
||||
assign(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -857,8 +852,6 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
|
||||
@@ -871,7 +864,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -896,8 +889,7 @@ forward_list<_Tp, _Alloc>::pop_front()
|
||||
__node_traits::deallocate(__a, __p, 1);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -915,8 +907,6 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
|
||||
return iterator(__r->__next_);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
||||
@@ -931,7 +921,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
||||
return iterator(__r->__next_);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
@@ -952,7 +942,7 @@ typename forward_list<_Tp, _Alloc>::iterator
|
||||
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
||||
const value_type& __v)
|
||||
{
|
||||
__node_pointer __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
__node_pointer const __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
if (__n > 0)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
@@ -964,7 +954,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (--__n; __n != 0; --__n, __last = __last->__next_)
|
||||
{
|
||||
__h.reset(__node_traits::allocate(__a, 1));
|
||||
@@ -984,10 +974,9 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__last->__next_ = __r->__next_;
|
||||
__r->__next_ = __first;
|
||||
__r = __last;
|
||||
}
|
||||
return iterator(__r);
|
||||
}
|
||||
@@ -1002,7 +991,7 @@ typename enable_if
|
||||
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
||||
_InputIterator __f, _InputIterator __l)
|
||||
{
|
||||
__node_pointer __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
__node_pointer const __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
if (__f != __l)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
@@ -1014,7 +1003,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (++__f; __f != __l; ++__f, __last = __last->__next_)
|
||||
{
|
||||
__h.reset(__node_traits::allocate(__a, 1));
|
||||
@@ -1034,16 +1023,15 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__last->__next_ = __r->__next_;
|
||||
__r->__next_ = __first;
|
||||
__r = __last;
|
||||
}
|
||||
return iterator(__r);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::erase_after(const_iterator __f)
|
||||
{
|
||||
__node_pointer __p = const_cast<__node_pointer>(__f.__ptr_);
|
||||
@@ -1052,18 +1040,17 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f)
|
||||
__node_allocator& __a = base::__alloc();
|
||||
__node_traits::destroy(__a, addressof(__n->__value_));
|
||||
__node_traits::deallocate(__a, __n, 1);
|
||||
return iterator(__p->__next_);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::erase_after(const_iterator __f, const_iterator __l)
|
||||
{
|
||||
__node_pointer __e = const_cast<__node_pointer>(__l.__ptr_);
|
||||
if (__f != __l)
|
||||
{
|
||||
__node_pointer __p = const_cast<__node_pointer>(__f.__ptr_);
|
||||
__node_pointer __n = __p->__next_;
|
||||
__node_pointer __e = const_cast<__node_pointer>(__l.__ptr_);
|
||||
if (__n != __e)
|
||||
{
|
||||
__p->__next_ = __e;
|
||||
@@ -1077,7 +1064,6 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f, const_iterator __l)
|
||||
} while (__n != __e);
|
||||
}
|
||||
}
|
||||
return iterator(__e);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
@@ -1147,7 +1133,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list&& __x)
|
||||
#else
|
||||
forward_list& __x)
|
||||
@@ -1172,7 +1158,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list&& __x,
|
||||
#else
|
||||
forward_list& __x,
|
||||
@@ -1194,7 +1180,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list&& __x,
|
||||
#else
|
||||
forward_list& __x,
|
||||
@@ -1282,7 +1268,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred)
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class _Compare>
|
||||
void
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
forward_list<_Tp, _Alloc>::merge(forward_list&& __x, _Compare __comp)
|
||||
#else
|
||||
forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp)
|
||||
|
@@ -122,7 +122,7 @@ public:
|
||||
void close();
|
||||
};
|
||||
|
||||
template <class charT, class traits>
|
||||
template <class charT, class traits>
|
||||
void
|
||||
swap(basic_ofstream<charT, traits>& x, basic_ofstream<charT, traits>& y);
|
||||
|
||||
@@ -189,13 +189,13 @@ public:
|
||||
|
||||
// 27.9.1.2 Constructors/destructor:
|
||||
basic_filebuf();
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_filebuf(basic_filebuf&& __rhs);
|
||||
#endif
|
||||
virtual ~basic_filebuf();
|
||||
|
||||
// 27.9.1.3 Assign/swap:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_filebuf& operator=(basic_filebuf&& __rhs);
|
||||
#endif
|
||||
void swap(basic_filebuf& __rhs);
|
||||
@@ -260,7 +260,7 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf()
|
||||
setbuf(0, 4096);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs)
|
||||
@@ -333,7 +333,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
|
||||
swap(__rhs);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_filebuf<_CharT, _Traits>::~basic_filebuf()
|
||||
@@ -341,14 +341,14 @@ basic_filebuf<_CharT, _Traits>::~basic_filebuf()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
close();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
if (__owns_eb_)
|
||||
delete [] __extbuf_;
|
||||
if (__owns_ib_)
|
||||
@@ -789,7 +789,7 @@ basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way,
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
typename basic_filebuf<_CharT, _Traits>::pos_type
|
||||
basic_filebuf<_CharT, _Traits>::seekpos(pos_type __sp, ios_base::openmode)
|
||||
basic_filebuf<_CharT, _Traits>::seekpos(pos_type __sp, ios_base::openmode __wch)
|
||||
{
|
||||
if (__file_ == 0 || sync())
|
||||
return pos_type(off_type(-1));
|
||||
@@ -970,11 +970,11 @@ public:
|
||||
basic_ifstream();
|
||||
explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in);
|
||||
explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ifstream(basic_ifstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ifstream& operator=(basic_ifstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ifstream& __rhs);
|
||||
@@ -1014,7 +1014,7 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1035,7 +1035,7 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1115,11 +1115,11 @@ public:
|
||||
basic_ofstream();
|
||||
explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out);
|
||||
explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ofstream(basic_ofstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ofstream& operator=(basic_ofstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ofstream& __rhs);
|
||||
@@ -1159,7 +1159,7 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1180,7 +1180,7 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1260,11 +1260,11 @@ public:
|
||||
basic_fstream();
|
||||
explicit basic_fstream(const char* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
|
||||
explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_fstream(basic_fstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_fstream& operator=(basic_fstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_fstream& __rhs);
|
||||
@@ -1304,7 +1304,7 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1325,7 +1325,7 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
|
@@ -32,7 +32,7 @@ struct binary_function
|
||||
typedef Result result_type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
template <ObjectType T>
|
||||
class reference_wrapper
|
||||
: public unary_function<T1, R> // if wrapping a unary functor
|
||||
: public binary_function<T1, T2, R> // if wraping a binary functor
|
||||
@@ -56,17 +56,18 @@ public:
|
||||
|
||||
// invoke
|
||||
template <class... ArgTypes>
|
||||
typename result_of<T(ArgTypes...)>::type
|
||||
requires Callable<T, ArgTypes&&...>
|
||||
Callable<T, ArgTypes&&...>::result_type
|
||||
operator() (ArgTypes&&...) const;
|
||||
};
|
||||
|
||||
template <class T> reference_wrapper<T> ref(T& t);
|
||||
template <class T> void ref(const T&& t) = delete;
|
||||
template <class T> reference_wrapper<T> ref(reference_wrapper<T>t);
|
||||
template <ObjectType T> reference_wrapper<T> ref(T& t);
|
||||
template <ObjectType T> void ref(const T&& t) = delete; // LWG 688
|
||||
template <ObjectType T> reference_wrapper<T> ref(reference_wrapper<T>t);
|
||||
|
||||
template <class T> reference_wrapper<const T> cref(const T& t);
|
||||
template <class T> void cref(const T&& t) = delete;
|
||||
template <class T> reference_wrapper<const T> cref(reference_wrapper<T> t);
|
||||
template <ObjectType T> reference_wrapper<const T> cref(const T& t);
|
||||
template <ObjectType T> void cref(const T&& t) = delete; // LWG 688
|
||||
template <ObjectType T> reference_wrapper<const T> cref(reference_wrapper<T> t);
|
||||
|
||||
template <class T>
|
||||
struct plus : binary_function<T, T, T>
|
||||
@@ -186,18 +187,18 @@ template <class Predicate> binary_negate<Predicate> not2(const Predicate& pred);
|
||||
template<class T> struct is_bind_expression;
|
||||
template<class T> struct is_placeholder;
|
||||
|
||||
template<class Fn, class... BoundArgs>
|
||||
unspecified bind(Fn&&, BoundArgs&&...);
|
||||
template<class R, class Fn, class... BoundArgs>
|
||||
unspecified bind(Fn&&, BoundArgs&&...);
|
||||
template<CopyConstructible Fn, CopyConstructible... Types>
|
||||
unspecified bind(Fn, Types...);
|
||||
template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
|
||||
unspecified bind(Fn, Types...);
|
||||
|
||||
namespace placeholders {
|
||||
// M is the implementation-defined number of placeholders
|
||||
namespace placeholders {
|
||||
// M is the implementation-defined number of placeholders
|
||||
extern unspecified _1;
|
||||
extern unspecified _2;
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
extern unspecified _M;
|
||||
}
|
||||
|
||||
@@ -333,28 +334,24 @@ public:
|
||||
template <class S, class T> const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
|
||||
template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
|
||||
|
||||
template<class R, class T> unspecified mem_fn(R T::*);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...));
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &&);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &&);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &&);
|
||||
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &&);
|
||||
|
||||
class bad_function_call
|
||||
: public exception
|
||||
{
|
||||
};
|
||||
|
||||
template<class> class function; // undefined
|
||||
template<Returnable R, class T> unspecified mem_fn(R T::* pm);
|
||||
template<Returnable R, class T, CopyConstructible... Args>
|
||||
unspecified mem_fn(R (T::* pm)(Args...));
|
||||
template<Returnable R, class T, CopyConstructible... Args>
|
||||
unspecified mem_fn(R (T::* pm)(Args...) const);
|
||||
template<Returnable R, class T, CopyConstructible... Args>
|
||||
unspecified mem_fn(R (T::* pm)(Args...) volatile);
|
||||
template<Returnable R, class T, CopyConstructible... Args>
|
||||
unspecified mem_fn(R (T::* pm)(Args...) const volatile);
|
||||
|
||||
template<class R, class... ArgTypes>
|
||||
template<FunctionType> class function; // undefined
|
||||
|
||||
template<Returnable R, CopyConstructible... ArgTypes>
|
||||
class function<R(ArgTypes...)>
|
||||
: public unary_function<T1, R> // iff sizeof...(ArgTypes) == 1 and
|
||||
// ArgTypes contains T1
|
||||
@@ -364,13 +361,19 @@ class function<R(ArgTypes...)>
|
||||
public:
|
||||
typedef R result_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
function();
|
||||
// 20.7.16.2.1, construct/copy/destroy:
|
||||
explicit function();
|
||||
function(nullptr_t);
|
||||
function(const function&);
|
||||
function(function&&);
|
||||
template<class F>
|
||||
requires CopyConstructible<F> && Callable<F, ArgTypes...>
|
||||
&& Convertible<Callable<F, ArgTypes...>::result_type, R>
|
||||
function(F);
|
||||
// template<class F>
|
||||
// requires CopyConstructible<F> && Callable<F, ArgTypes...>
|
||||
// && Convertible<Callable<F, ArgTypes...>::result_type, R>
|
||||
// function(F&&);
|
||||
template<Allocator Alloc>
|
||||
function(allocator_arg_t, const Alloc&);
|
||||
template<Allocator Alloc>
|
||||
@@ -381,23 +384,35 @@ public:
|
||||
function(allocator_arg_t, const Alloc&, function&&);
|
||||
template<class F, Allocator Alloc>
|
||||
function(allocator_arg_t, const Alloc&, F);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F&&);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(function&&);
|
||||
function& operator=(nullptr_t);
|
||||
template<class F>
|
||||
function& operator=(F&&);
|
||||
requires CopyConstructible<F> && Callable<F, ArgTypes..>
|
||||
&& Convertible<Callable<F, ArgTypes...>::result_type
|
||||
function& operator=(F);
|
||||
// template<class F>
|
||||
// requires CopyConstructible<F> && Callable<F, ArgTypes...>
|
||||
// && Convertible<Callable<F, ArgTypes...>::result_type, R>
|
||||
// function& operator=(F&&);
|
||||
template<class F>
|
||||
requires Callable<F, ArgTypes...>
|
||||
&& Convertible<Callable<F, ArgTypes...>::result_type, R>
|
||||
function& operator=(reference_wrapper<F>);
|
||||
|
||||
~function();
|
||||
|
||||
// function modifiers:
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class F, class Alloc>
|
||||
void assign(F&&, const Alloc&);
|
||||
template<class F, Allocator Alloc>
|
||||
requires Callable<F, ArgTypes...>
|
||||
&& Convertible<Callable<F, ArgTypes...>::result_type, R>
|
||||
void assign(F, const Alloc&);
|
||||
|
||||
// function capacity:
|
||||
// 20.7.16.2.3, function capacity:
|
||||
explicit operator bool() const;
|
||||
|
||||
// deleted overloads close possible hole in the type system
|
||||
@@ -406,30 +421,36 @@ public:
|
||||
template<class R2, class... ArgTypes2>
|
||||
bool operator!=(const function<R2(ArgTypes2...)>&) = delete;
|
||||
|
||||
// function invocation:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
R operator()(ArgTypes...) const;
|
||||
|
||||
// function target access:
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename T> T* target();
|
||||
template <typename T> const T* target() const;
|
||||
template <typename T>
|
||||
requires Callable<T, ArgTypes...>
|
||||
&& Convertible<Callable<T, ArgTypes...>::result_type, R>
|
||||
T* target();
|
||||
template <typename T>
|
||||
requires Callable<T, ArgTypes...>
|
||||
&& Convertible<Callable<T, ArgTypes...>::result_type, R>
|
||||
const T* target() const;
|
||||
};
|
||||
|
||||
// Null pointer comparisons:
|
||||
template <class R, class ... ArgTypes>
|
||||
// 20.7.16.2.6, Null pointer comparisons:
|
||||
template <MoveConstructible R, MoveConstructible ... ArgTypes>
|
||||
bool operator==(const function<R(ArgTypes...)>&, nullptr_t);
|
||||
|
||||
template <class R, class ... ArgTypes>
|
||||
template <MoveConstructible R, MoveConstructible ... ArgTypes>
|
||||
bool operator==(nullptr_t, const function<R(ArgTypes...)>&);
|
||||
|
||||
template <class R, class ... ArgTypes>
|
||||
template <MoveConstructible R, MoveConstructible ... ArgTypes>
|
||||
bool operator!=(const function<R(ArgTypes...)>&, nullptr_t);
|
||||
|
||||
template <class R, class ... ArgTypes>
|
||||
template <MoveConstructible R, MoveConstructible ... ArgTypes>
|
||||
bool operator!=(nullptr_t, const function<R(ArgTypes...)>&);
|
||||
|
||||
// specialized algorithms:
|
||||
template <class R, class ... ArgTypes>
|
||||
// 20.7.16.2.7, specialized algorithms:
|
||||
template <MoveConstructible R, MoveConstructible ... ArgTypes>
|
||||
void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&);
|
||||
|
||||
template <class T> struct hash;
|
||||
@@ -861,6 +882,7 @@ const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
|
||||
mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
|
||||
{return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
|
||||
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#include <__functional_03>
|
||||
@@ -978,10 +1000,8 @@ public:
|
||||
virtual void destroy() = 0;
|
||||
virtual void destroy_deallocate() = 0;
|
||||
virtual _R operator()(_ArgTypes&& ...) = 0;
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const = 0;
|
||||
virtual const std::type_info& target_type() const = 0;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _FD, class _Alloc, class _FB> class __func;
|
||||
@@ -999,10 +1019,8 @@ public:
|
||||
virtual void destroy();
|
||||
virtual void destroy_deallocate();
|
||||
virtual _R operator()(_ArgTypes&& ... __arg);
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
virtual const void* target(const type_info&) const;
|
||||
virtual const std::type_info& target_type() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _F, class _Alloc, class _R, class ..._ArgTypes>
|
||||
@@ -1048,8 +1066,6 @@ __func<_F, _Alloc, _R(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
|
||||
return __invoke(__f_.first(), _STD::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _F, class _Alloc, class _R, class ..._ArgTypes>
|
||||
const void*
|
||||
__func<_F, _Alloc, _R(_ArgTypes...)>::target(const type_info& __ti) const
|
||||
@@ -1066,8 +1082,6 @@ __func<_F, _Alloc, _R(_ArgTypes...)>::target_type() const
|
||||
return typeid(_F);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
} // __function
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
@@ -1096,26 +1110,27 @@ class function<_R(_ArgTypes...)>
|
||||
public:
|
||||
typedef _R result_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
function() : __f_(0) {}
|
||||
// 20.7.16.2.1, construct/copy/destroy:
|
||||
explicit function() : __f_(0) {}
|
||||
function(nullptr_t) : __f_(0) {}
|
||||
function(const function&);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
function(function&&);
|
||||
#endif
|
||||
template<class _F>
|
||||
function(_F,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, const function&);
|
||||
template<class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc&, function&&);
|
||||
template<class _F, class _Alloc>
|
||||
function(allocator_arg_t, const _Alloc& __a, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type* = 0);
|
||||
// template<class _Alloc>
|
||||
// function(allocator_arg_t, const _Alloc&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, nullptr_t);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, const function&);
|
||||
// template<Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, function&&);
|
||||
// template<class F, Allocator Alloc>
|
||||
// function(allocator_arg_t, const Alloc&, F);
|
||||
|
||||
function& operator=(const function&);
|
||||
function& operator=(function&&);
|
||||
@@ -1130,30 +1145,28 @@ public:
|
||||
|
||||
~function();
|
||||
|
||||
// function modifiers:
|
||||
// 20.7.16.2.2, function modifiers:
|
||||
void swap(function&);
|
||||
template<class _F, class _Alloc>
|
||||
void assign(_F&& __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, _STD::forward<_F>(__f)).swap(*this);}
|
||||
// template<class _F, class _Alloc>
|
||||
// void assign(_F, const _Alloc&);
|
||||
|
||||
// function capacity:
|
||||
// 20.7.16.2.3, function capacity:
|
||||
/*explicit*/ operator bool() const {return __f_;}
|
||||
|
||||
private:
|
||||
// deleted overloads close possible hole in the type system
|
||||
template<class _R2, class... _ArgTypes2>
|
||||
bool operator==(const function<_R2(_ArgTypes2...)>&) = delete;
|
||||
bool operator==(const function<_R2(_ArgTypes2...)>&);// = delete;
|
||||
template<class _R2, class... _ArgTypes2>
|
||||
bool operator!=(const function<_R2(_ArgTypes2...)>&) = delete;
|
||||
bool operator!=(const function<_R2(_ArgTypes2...)>&);// = delete;
|
||||
public:
|
||||
// function invocation:
|
||||
// 20.7.16.2.4, function invocation:
|
||||
_R operator()(_ArgTypes...) const;
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
// function target access:
|
||||
// 20.7.16.2.5, function target access:
|
||||
const std::type_info& target_type() const;
|
||||
template <typename _T> _T* target();
|
||||
template <typename _T> const _T* target() const;
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
};
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
@@ -1170,22 +1183,6 @@ function<_R(_ArgTypes...)>::function(const function& __f)
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
template <class _Alloc>
|
||||
function<_R(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
|
||||
const function& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (const __base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
__f_ = __f.__f_->__clone();
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
function<_R(_ArgTypes...)>::function(function&& __f)
|
||||
{
|
||||
@@ -1203,25 +1200,6 @@ function<_R(_ArgTypes...)>::function(function&& __f)
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
template <class _Alloc>
|
||||
function<_R(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
|
||||
function&& __f)
|
||||
{
|
||||
if (__f.__f_ == 0)
|
||||
__f_ = 0;
|
||||
else if (__f.__f_ == (__base*)&__f.__buf_)
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
__f.__f_->__clone(__f_);
|
||||
}
|
||||
else
|
||||
{
|
||||
__f_ = __f.__f_;
|
||||
__f.__f_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
template <class _F>
|
||||
function<_R(_ArgTypes...)>::function(_F __f,
|
||||
@@ -1248,39 +1226,6 @@ function<_R(_ArgTypes...)>::function(_F __f,
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
template <class _F, class _Alloc>
|
||||
function<_R(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a0, _F __f,
|
||||
typename enable_if<!is_integral<_F>::value>::type*)
|
||||
: __f_(0)
|
||||
{
|
||||
typedef allocator_traits<_Alloc> __alloc_traits;
|
||||
if (__not_null(__f))
|
||||
{
|
||||
typedef __function::__func<_F, _Alloc, _R(_ArgTypes...)> _FF;
|
||||
if (sizeof(_FF) <= sizeof(__buf_))
|
||||
{
|
||||
__f_ = (__base*)&__buf_;
|
||||
::new (__f_) _FF(_STD::move(__f));
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename __alloc_traits::template
|
||||
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
rebind_alloc<_FF>
|
||||
#else
|
||||
rebind_alloc<_FF>::other
|
||||
#endif
|
||||
_A;
|
||||
_A __a(__a0);
|
||||
typedef __allocator_destructor<_A> _D;
|
||||
unique_ptr<__base, _D> __hold(__a.allocate(1), _D(__a, 1));
|
||||
::new (__hold.get()) _FF(_STD::move(__f), _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
function<_R(_ArgTypes...)>&
|
||||
function<_R(_ArgTypes...)>::operator=(const function& __f)
|
||||
@@ -1386,15 +1331,11 @@ template<class _R, class ..._ArgTypes>
|
||||
_R
|
||||
function<_R(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__f_ == 0)
|
||||
throw bad_function_call();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return (*__f_)(_STD::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
template<class _R, class ..._ArgTypes>
|
||||
const std::type_info&
|
||||
function<_R(_ArgTypes...)>::target_type() const
|
||||
@@ -1424,29 +1365,27 @@ function<_R(_ArgTypes...)>::target() const
|
||||
return (const _T*)__f_->target(typeid(_T));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
template <class _R, class... _ArgTypes>
|
||||
template <class _R, class... _ArgTypes>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const function<_R(_ArgTypes...)>& __f, nullptr_t) {return !__f;}
|
||||
|
||||
template <class _R, class... _ArgTypes>
|
||||
template <class _R, class... _ArgTypes>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(nullptr_t, const function<_R(_ArgTypes...)>& __f) {return !__f;}
|
||||
|
||||
template <class _R, class... _ArgTypes>
|
||||
template <class _R, class... _ArgTypes>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const function<_R(_ArgTypes...)>& __f, nullptr_t) {return (bool)__f;}
|
||||
|
||||
template <class _R, class... _ArgTypes>
|
||||
template <class _R, class... _ArgTypes>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(nullptr_t, const function<_R(_ArgTypes...)>& __f) {return (bool)__f;}
|
||||
|
||||
template <class _R, class... _ArgTypes>
|
||||
template <class _R, class... _ArgTypes>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(function<_R(_ArgTypes...)>& __x, function<_R(_ArgTypes...)>& __y)
|
||||
@@ -1499,6 +1438,7 @@ struct __mu_return1<true, _Ti, _Uj...>
|
||||
typedef typename result_of<_Ti(_Uj...)>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <class _Ti, class ..._Uj, size_t ..._Indx>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename __mu_return1<true, _Ti, _Uj...>::type
|
||||
@@ -1636,7 +1576,7 @@ __apply_functor(_F& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
|
||||
return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
|
||||
}
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
class __bind
|
||||
: public __weak_result_type<_F>
|
||||
{
|
||||
@@ -1659,7 +1599,7 @@ public:
|
||||
operator()(_Args&& ...__args)
|
||||
{
|
||||
// compiler bug workaround
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(__args...));
|
||||
}
|
||||
|
||||
@@ -1667,15 +1607,15 @@ public:
|
||||
typename __bind_return<_F, tuple<_BoundArgs...>, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args) const
|
||||
{
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
return __apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(__args...));
|
||||
}
|
||||
};
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
struct __is_bind_expression<__bind<_F, _BoundArgs...> > : public true_type {};
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
class __bind_r
|
||||
: public __bind<_F, _BoundArgs...>
|
||||
{
|
||||
@@ -1703,10 +1643,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
struct __is_bind_expression<__bind_r<_R, _F, _BoundArgs...> > : public true_type {};
|
||||
|
||||
template<class _F, class ..._BoundArgs>
|
||||
template<class _F, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__bind<typename decay<_F>::type, typename decay<_BoundArgs>::type...>
|
||||
bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
@@ -1715,7 +1655,7 @@ bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
return type(_STD::forward<_F>(__f), _STD::forward<_BoundArgs>(__bound_args)...);
|
||||
}
|
||||
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
template<class _R, class _F, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__bind_r<_R, typename decay<_F>::type, typename decay<_BoundArgs>::type...>
|
||||
bind(_F&& __f, _BoundArgs&&... __bound_args)
|
||||
@@ -1770,7 +1710,7 @@ struct hash<char32_t>
|
||||
size_t operator()(char32_t __v) const {return static_cast<size_t>(__v);}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct hash<wchar_t>
|
||||
|
1963
include/future
1963
include/future
File diff suppressed because it is too large
Load Diff
@@ -270,7 +270,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __s(__is);
|
||||
if (__s)
|
||||
{
|
||||
@@ -287,7 +287,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __s(__is);
|
||||
if (__s)
|
||||
{
|
||||
@@ -405,7 +405,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -464,7 +464,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
|
20
include/ios
20
include/ios
@@ -310,13 +310,13 @@ public:
|
||||
iostate rdstate() const;
|
||||
void clear(iostate __state = goodbit);
|
||||
void setstate(iostate __state);
|
||||
|
||||
bool good() const;
|
||||
bool eof() const;
|
||||
bool fail() const;
|
||||
bool bad() const;
|
||||
|
||||
bool good() const;
|
||||
bool eof() const;
|
||||
bool fail() const;
|
||||
bool bad() const;
|
||||
|
||||
iostate exceptions() const;
|
||||
iostate exceptions() const;
|
||||
void exceptions(iostate __except);
|
||||
|
||||
void __set_badbit_and_consider_rethrow();
|
||||
@@ -402,10 +402,10 @@ make_error_condition(io_errc __e)
|
||||
|
||||
class ios_base::failure
|
||||
: public system_error
|
||||
{
|
||||
public:
|
||||
{
|
||||
public:
|
||||
explicit failure(const string& __msg, const error_code& __ec = io_errc::stream);
|
||||
explicit failure(const char* __msg, const error_code& __ec = io_errc::stream);
|
||||
explicit failure(const char* __msg, const error_code& __ec = io_errc::stream);
|
||||
virtual ~failure() throw();
|
||||
};
|
||||
|
||||
@@ -609,7 +609,7 @@ protected:
|
||||
void init(basic_streambuf<char_type, traits_type>* __sb);
|
||||
|
||||
void move(basic_ios& __rhs);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void move(basic_ios&& __rhs) {move(__rhs);}
|
||||
#endif
|
||||
void swap(basic_ios& __rhs);
|
||||
|
@@ -92,8 +92,8 @@ typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _CharT> struct _LIBCPP_VISIBLE char_traits;
|
||||
template<class _Tp> class _LIBCPP_VISIBLE allocator;
|
||||
template<class _CharT> struct char_traits;
|
||||
template<class _Tp> class allocator;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> > class basic_ios;
|
||||
|
||||
@@ -158,13 +158,13 @@ typedef fpos<mbstate_t> wstreampos;
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef fpos<mbstate_t> u16streampos;
|
||||
typedef fpos<mbstate_t> u32streampos;
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
typedef long long streamoff; // for char_traits in <string>
|
||||
|
||||
template <class _CharT, // for <stdexcept>
|
||||
class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> > class _LIBCPP_VISIBLE basic_string;
|
||||
class _Allocator = allocator<_CharT> > class basic_string;
|
||||
typedef basic_string<char, char_traits<char>, allocator<char> > string;
|
||||
typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
|
||||
|
||||
|
176
include/istream
176
include/istream
@@ -176,12 +176,12 @@ public:
|
||||
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_istream();
|
||||
protected:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_istream(basic_istream&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.7.1.1.2 Assign/swap:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_istream& operator=(basic_istream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_istream& __rhs);
|
||||
@@ -287,7 +287,7 @@ basic_istream<_CharT, _Traits>::basic_istream(basic_streambuf<char_type, traits_
|
||||
this->init(__sb);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -307,7 +307,7 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_istream<_CharT, _Traits>::~basic_istream()
|
||||
@@ -330,7 +330,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -373,7 +373,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ basic_istream<_CharT, _Traits>::operator>>(long& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -400,7 +400,7 @@ basic_istream<_CharT, _Traits>::operator>>(long& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -427,7 +427,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ basic_istream<_CharT, _Traits>::operator>>(long long& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -454,7 +454,7 @@ basic_istream<_CharT, _Traits>::operator>>(long long& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -481,7 +481,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ basic_istream<_CharT, _Traits>::operator>>(float& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -508,7 +508,7 @@ basic_istream<_CharT, _Traits>::operator>>(float& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ basic_istream<_CharT, _Traits>::operator>>(double& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ basic_istream<_CharT, _Traits>::operator>>(double& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ basic_istream<_CharT, _Traits>::operator>>(long double& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -562,7 +562,7 @@ basic_istream<_CharT, _Traits>::operator>>(long double& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ basic_istream<_CharT, _Traits>::operator>>(bool& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -589,7 +589,7 @@ basic_istream<_CharT, _Traits>::operator>>(bool& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ basic_istream<_CharT, _Traits>::operator>>(void*& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -616,7 +616,7 @@ basic_istream<_CharT, _Traits>::operator>>(void*& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ basic_istream<_CharT, _Traits>::operator>>(short& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -656,7 +656,7 @@ basic_istream<_CharT, _Traits>::operator>>(short& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ basic_istream<_CharT, _Traits>::operator>>(int& __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -696,7 +696,7 @@ basic_istream<_CharT, _Traits>::operator>>(int& __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -768,7 +768,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -817,7 +817,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this, true);
|
||||
if (__s)
|
||||
{
|
||||
@@ -855,7 +855,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef istreambuf_iterator<char_type, traits_type> _I;
|
||||
typedef ostreambuf_iterator<char_type, traits_type> _O;
|
||||
_I __i(*this);
|
||||
@@ -880,7 +880,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
|
||||
if (__c == 0)
|
||||
this->__set_failbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
else
|
||||
this->setstate(ios_base::failbit);
|
||||
@@ -892,7 +892,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -905,7 +905,7 @@ basic_istream<_CharT, _Traits>::get()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this, true);
|
||||
if (__s)
|
||||
{
|
||||
@@ -932,7 +932,7 @@ basic_istream<_CharT, _Traits>::get()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __r;
|
||||
}
|
||||
|
||||
@@ -955,7 +955,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -990,7 +990,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1020,7 +1020,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef istreambuf_iterator<char_type, traits_type> _I;
|
||||
typedef ostreambuf_iterator<char_type, traits_type> _O;
|
||||
_I __i(*this);
|
||||
@@ -1042,7 +1042,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
if (__c == 0)
|
||||
__err |= ios_base::failbit;
|
||||
this->setstate(__err);
|
||||
@@ -1054,7 +1054,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1074,7 +1074,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1112,7 +1112,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1132,7 +1132,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1172,7 +1172,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1185,7 +1185,7 @@ basic_istream<_CharT, _Traits>::peek()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
__r = this->rdbuf()->sgetc();
|
||||
@@ -1195,7 +1195,7 @@ basic_istream<_CharT, _Traits>::peek()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __r;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1207,7 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1234,7 +1234,7 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1247,7 +1247,7 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1279,7 +1279,7 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __c;
|
||||
}
|
||||
|
||||
@@ -1291,7 +1291,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1306,7 +1306,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1318,7 +1318,7 @@ basic_istream<_CharT, _Traits>::unget()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1333,7 +1333,7 @@ basic_istream<_CharT, _Traits>::unget()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1345,7 +1345,7 @@ basic_istream<_CharT, _Traits>::sync()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1363,7 +1363,7 @@ basic_istream<_CharT, _Traits>::sync()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __r;
|
||||
}
|
||||
|
||||
@@ -1375,7 +1375,7 @@ basic_istream<_CharT, _Traits>::tellg()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
__r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
|
||||
@@ -1385,7 +1385,7 @@ basic_istream<_CharT, _Traits>::tellg()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __r;
|
||||
}
|
||||
|
||||
@@ -1396,7 +1396,7 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))
|
||||
@@ -1407,7 +1407,7 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1418,7 +1418,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
this->rdbuf()->pubseekoff(__off, __dir, ios_base::in);
|
||||
@@ -1428,7 +1428,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1439,7 +1439,7 @@ ws(basic_istream<_CharT, _Traits>& __is)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1459,11 +1459,11 @@ ws(basic_istream<_CharT, _Traits>& __is)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1474,7 +1474,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
|
||||
return __is;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
class basic_iostream
|
||||
@@ -1493,12 +1493,12 @@ public:
|
||||
explicit basic_iostream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_iostream();
|
||||
protected:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_iostream(basic_iostream&& __rhs);
|
||||
#endif
|
||||
|
||||
// assign/swap
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_iostream& operator=(basic_iostream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_iostream& __rhs);
|
||||
@@ -1512,7 +1512,7 @@ basic_iostream<_CharT, _Traits>::basic_iostream(basic_streambuf<char_type, trait
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1530,7 +1530,7 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_iostream<_CharT, _Traits>::~basic_iostream()
|
||||
@@ -1553,7 +1553,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1591,19 +1591,19 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
basic_istream<_CharT, _Traits>&
|
||||
getline(basic_istream<_CharT, _Traits>& __is,
|
||||
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1642,24 +1642,24 @@ getline(basic_istream<_CharT, _Traits>& __is,
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
inline
|
||||
basic_istream<_CharT, _Traits>&
|
||||
basic_istream<_CharT, _Traits>&
|
||||
getline(basic_istream<_CharT, _Traits>& __is,
|
||||
basic_string<_CharT, _Traits, _Allocator>& __str)
|
||||
{
|
||||
return getline(__is, __str, __is.widen('\n'));
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
inline
|
||||
basic_istream<_CharT, _Traits>&
|
||||
basic_istream<_CharT, _Traits>&
|
||||
getline(basic_istream<_CharT, _Traits>&& __is,
|
||||
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
|
||||
{
|
||||
@@ -1668,14 +1668,14 @@ getline(basic_istream<_CharT, _Traits>&& __is,
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
inline
|
||||
basic_istream<_CharT, _Traits>&
|
||||
basic_istream<_CharT, _Traits>&
|
||||
getline(basic_istream<_CharT, _Traits>&& __is,
|
||||
basic_string<_CharT, _Traits, _Allocator>& __str)
|
||||
{
|
||||
return getline(__is, __str, __is.widen('\n'));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, size_t _Size>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -1684,7 +1684,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
|
||||
if (__sen)
|
||||
{
|
||||
@@ -1720,7 +1720,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
|
||||
{
|
||||
__is.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __is;
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
typedef typename iterator_traits<Iterator>::difference_type difference_type;
|
||||
typedef typename iterator_traits<Iterator>::reference reference;
|
||||
typedef typename iterator_traits<Iterator>::pointer pointer;
|
||||
|
||||
|
||||
reverse_iterator();
|
||||
explicit reverse_iterator(Iterator x);
|
||||
template <class U> reverse_iterator(const reverse_iterator<U>& u);
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
typedef typename iterator_traits<_Iter>::difference_type difference_type;
|
||||
typedef typename iterator_traits<_Iter>::reference reference;
|
||||
typedef typename iterator_traits<_Iter>::pointer pointer;
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY reverse_iterator() : current() {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
|
||||
template <class _Up> _LIBCPP_INLINE_VISIBILITY reverse_iterator(const reverse_iterator<_Up>& __u)
|
||||
@@ -626,10 +626,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(&__x) {}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{container->push_back(__value); return *this;}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_back(_STD::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator operator++(int) {return *this;}
|
||||
@@ -659,10 +659,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(&__x) {}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{container->push_front(__value); return *this;}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_front(_STD::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator operator++(int) {return *this;}
|
||||
@@ -694,10 +694,10 @@ public:
|
||||
: container(&__x), iter(__i) {}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{iter = container->insert(iter, __value); ++iter; return *this;}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{iter = container->insert(iter, _STD::move(__value)); ++iter; return *this;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator++(int) {return *this;}
|
||||
@@ -890,12 +890,12 @@ public:
|
||||
typedef typename iterator_traits<iterator_type>::value_type value_type;
|
||||
typedef typename iterator_traits<iterator_type>::difference_type difference_type;
|
||||
typedef typename iterator_traits<iterator_type>::pointer pointer;
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
typedef value_type&& reference;
|
||||
#else
|
||||
typedef typename iterator_traits<iterator_type>::reference reference;
|
||||
#endif
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY move_iterator() : __i() {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit move_iterator(_Iter __x) : __i(__x) {}
|
||||
template <class _Up> _LIBCPP_INLINE_VISIBILITY move_iterator(const move_iterator<_Up>& __u)
|
||||
@@ -1091,37 +1091,37 @@ private:
|
||||
friend
|
||||
bool
|
||||
operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1, class _Iter2>
|
||||
friend
|
||||
typename __wrap_iter<_Iter1>::difference_type
|
||||
operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
|
||||
|
||||
|
||||
template <class _Iter1>
|
||||
friend
|
||||
__wrap_iter<_Iter1>
|
||||
@@ -1260,7 +1260,7 @@ private:
|
||||
iterator_type __i;
|
||||
__debug_iter* __next;
|
||||
__container_type* __cont;
|
||||
|
||||
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY __debug_iter() : __next(0), __cont(0) {}
|
||||
_LIBCPP_INLINE_VISIBILITY __debug_iter(const __debug_iter& __x)
|
||||
@@ -1297,7 +1297,7 @@ private:
|
||||
void __remove_owner();
|
||||
static void __remove_all(__container_type* __c);
|
||||
static void swap(__container_type* __x, __container_type* __y);
|
||||
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY bool __is_deref() const
|
||||
{return __is_deref(__is_random_access_iterator<iterator_type>());}
|
||||
bool __is_deref(false_type) const;
|
||||
@@ -1327,37 +1327,37 @@ private:
|
||||
friend
|
||||
bool
|
||||
operator==(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator<(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator!=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator>(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator>=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
bool
|
||||
operator<=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1, class _Iter2>
|
||||
friend
|
||||
typename __debug_iter<_Cp, _Iter1>::difference_type
|
||||
operator-(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&);
|
||||
|
||||
|
||||
template <class _Cp, class _Iter1>
|
||||
friend
|
||||
__debug_iter<_Cp, _Iter1>
|
||||
@@ -1376,7 +1376,7 @@ __debug_iter<_Container, _Iter>::operator=(const __debug_iter& __x)
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template <class _Container, class _Iter>
|
||||
void
|
||||
__debug_iter<_Container, _Iter>::__set_owner(const __container_type* __c)
|
||||
@@ -1615,7 +1615,7 @@ operator+(typename __debug_iter<_Container, _Iter>::difference_type __n,
|
||||
|
||||
#endif // _LIBCPP_DEBUG
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _C>
|
||||
inline
|
||||
@@ -1649,7 +1649,7 @@ end(const _C& __c) -> decltype(__c.end())
|
||||
return __c.end();
|
||||
}
|
||||
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#else
|
||||
|
||||
template <class _C>
|
||||
inline
|
||||
@@ -1683,7 +1683,7 @@ end(const _C& __c)
|
||||
return __c.end();
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#endif
|
||||
|
||||
template <class _T, size_t _N>
|
||||
inline
|
||||
|
58
include/list
58
include/list
@@ -501,11 +501,11 @@ public:
|
||||
list& operator=(const list& __c);
|
||||
list(initializer_list<value_type> __il);
|
||||
list(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
list(list&& __c);
|
||||
list(list&& __c, const allocator_type& __a);
|
||||
list& operator=(list&& __c);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
list& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -541,19 +541,17 @@ public:
|
||||
reference back() {return base::__end_.__prev_->__value_;}
|
||||
const_reference back() const {return base::__end_.__prev_->__value_;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push_front(value_type&& __x);
|
||||
void push_back(value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace_front(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator emplace(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
iterator insert(const_iterator __p, value_type&& __x);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void push_front(const value_type& __x);
|
||||
void push_back(const value_type& __x);
|
||||
@@ -579,19 +577,19 @@ public:
|
||||
void resize(size_type __n, const value_type& __x);
|
||||
|
||||
void splice(const_iterator __p, list& __c);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void splice(const_iterator __p, list&& __c) {splice(__p, __c);}
|
||||
#endif
|
||||
void splice(const_iterator __p, list& __c, const_iterator __i);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void splice(const_iterator __p, list&& __c, const_iterator __i)
|
||||
{splice(__p, __c, __i);}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l)
|
||||
{splice(__p, __c, __f, __l);}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void remove(const value_type& __x);
|
||||
template <class _Pred> void remove_if(_Pred __pred);
|
||||
@@ -599,15 +597,15 @@ public:
|
||||
template <class _BinaryPred>
|
||||
void unique(_BinaryPred __binary_pred);
|
||||
void merge(list& __c);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void merge(list&& __c) {merge(__c);}
|
||||
#endif
|
||||
template <class _Comp>
|
||||
void merge(list& __c, _Comp __comp);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Comp>
|
||||
void merge(list&& __c, _Comp __comp) {merge(__c, __comp);}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void sort();
|
||||
template <class _Comp>
|
||||
void sort(_Comp __comp);
|
||||
@@ -649,7 +647,7 @@ template <class _Tp, class _Alloc>
|
||||
list<_Tp, _Alloc>::list(size_type __n)
|
||||
{
|
||||
for (; __n > 0; --__n)
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
emplace_back();
|
||||
#else
|
||||
push_back(value_type());
|
||||
@@ -738,7 +736,7 @@ list<_Tp, _Alloc>::operator=(const list& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -794,7 +792,7 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type)
|
||||
splice(end(), __c);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class _InpIter>
|
||||
@@ -868,7 +866,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||
{
|
||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||
@@ -892,7 +890,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__r.__ptr_, *__e.__ptr_);
|
||||
base::__sz() += __ds;
|
||||
}
|
||||
@@ -921,7 +919,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (++__f; __f != __l; ++__f, ++__e, ++__ds)
|
||||
{
|
||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||
@@ -945,7 +943,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__r.__ptr_, *__e.__ptr_);
|
||||
base::__sz() += __ds;
|
||||
}
|
||||
@@ -978,7 +976,7 @@ list<_Tp, _Alloc>::push_back(const value_type& __x)
|
||||
__hold.release();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -1006,8 +1004,6 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
|
||||
__hold.release();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1051,8 +1047,6 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args)
|
||||
return iterator(__hold.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename list<_Tp, _Alloc>::iterator
|
||||
list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
|
||||
@@ -1067,7 +1061,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
|
||||
return iterator(__hold.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -1148,7 +1142,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||
{
|
||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||
@@ -1172,7 +1166,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__link_nodes(static_cast<__node&>(base::__end_), *__r.__ptr_, *__e.__ptr_);
|
||||
base::__sz() += __ds;
|
||||
}
|
||||
@@ -1199,7 +1193,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||
{
|
||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||
@@ -1223,10 +1217,10 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
|
||||
}
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__link_nodes(static_cast<__node&>(base::__end_), *__r.__ptr_, *__e.__ptr_);
|
||||
base::__sz() += __ds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
|
@@ -264,7 +264,7 @@ __nolocale_isdigit(int __c)
|
||||
return isdigit_l(__c, 0);
|
||||
}
|
||||
|
||||
#else // __APPLE__
|
||||
#else /* !__APPLE__ */
|
||||
inline int
|
||||
__nolocale_sprintf(char* __restrict __str,
|
||||
const char* __restrict __format, ...)
|
||||
@@ -315,7 +315,7 @@ __nolocale_isdigit(int __c)
|
||||
{
|
||||
return isdigit(__c);
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
// __scan_keyword
|
||||
// Scans [__b, __e) until a match is found in the basic_strings range
|
||||
@@ -456,6 +456,7 @@ struct __num_get_base
|
||||
void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
|
||||
ios_base::iostate& __err);
|
||||
|
||||
|
||||
template <class _CharT>
|
||||
struct __num_get
|
||||
: protected __num_get_base
|
||||
@@ -835,7 +836,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
@@ -870,8 +871,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
|
||||
@@ -905,7 +906,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
@@ -940,7 +941,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
@@ -975,7 +976,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
@@ -1010,7 +1011,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping, __g, __g_end,
|
||||
__atoms))
|
||||
break;
|
||||
@@ -1038,8 +1039,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
char_type __atoms[32];
|
||||
char_type __decimal_point;
|
||||
char_type __thousands_sep;
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
__decimal_point,
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
__decimal_point,
|
||||
__thousands_sep);
|
||||
char __a[__num_get_base::__num_get_buf_sz] = {0};
|
||||
char* __a_end = __a;
|
||||
@@ -1049,8 +1050,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
bool __in_units = true;
|
||||
char __exp = 'E';
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
__grouping, __g, __g_end,
|
||||
__dc, __atoms))
|
||||
break;
|
||||
@@ -1078,8 +1079,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
char_type __atoms[32];
|
||||
char_type __decimal_point;
|
||||
char_type __thousands_sep;
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
__decimal_point,
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
__decimal_point,
|
||||
__thousands_sep);
|
||||
char __a[__num_get_base::__num_get_buf_sz] = {0};
|
||||
char* __a_end = __a;
|
||||
@@ -1089,8 +1090,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
bool __in_units = true;
|
||||
char __exp = 'E';
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
__grouping, __g, __g_end,
|
||||
__dc, __atoms))
|
||||
break;
|
||||
@@ -1118,7 +1119,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
char_type __atoms[32];
|
||||
char_type __decimal_point;
|
||||
char_type __thousands_sep;
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
string __grouping = this->__stage2_float_prep(__iob, __atoms,
|
||||
__decimal_point,
|
||||
__thousands_sep);
|
||||
char __a[__num_get_base::__num_get_buf_sz] = {0};
|
||||
@@ -1129,8 +1130,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
bool __in_units = true;
|
||||
char __exp = 'E';
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
|
||||
__decimal_point, __thousands_sep,
|
||||
__grouping, __g, __g_end,
|
||||
__dc, __atoms))
|
||||
break;
|
||||
@@ -1167,8 +1168,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
|
||||
unsigned* __g_end = __g;
|
||||
unsigned __dc = 0;
|
||||
for (; __b != __e; ++__b)
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping,
|
||||
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
|
||||
__thousands_sep, __grouping,
|
||||
__g, __g_end, __atoms))
|
||||
break;
|
||||
// Stage 3
|
||||
@@ -2778,7 +2779,7 @@ public:
|
||||
protected:
|
||||
|
||||
~money_get() {}
|
||||
|
||||
|
||||
virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl,
|
||||
ios_base& __iob, ios_base::iostate& __err,
|
||||
long double& __v) const;
|
||||
@@ -2866,7 +2867,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// drop through
|
||||
// drop through
|
||||
case money_base::none:
|
||||
if (__p != 3)
|
||||
{
|
||||
@@ -3564,7 +3565,7 @@ public:
|
||||
wstring_convert(_Codecvt* __pcvt, state_type __state);
|
||||
wstring_convert(const byte_string& __byte_err,
|
||||
const wide_string& __wide_err = wide_string());
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
wstring_convert(wstring_convert&& __wc);
|
||||
#endif
|
||||
~wstring_convert();
|
||||
@@ -3614,7 +3615,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
__cvtptr_ = new _Codecvt;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
|
||||
inline
|
||||
@@ -3628,7 +3629,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
__wc.__cvtptr_ = nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
|
||||
wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert()
|
||||
@@ -3689,10 +3690,8 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
if (__r == codecvt_base::ok)
|
||||
return __ws;
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__wide_err_string_.empty())
|
||||
throw range_error("wstring_convert: from_bytes error");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return __wide_err_string_;
|
||||
}
|
||||
|
||||
@@ -3777,10 +3776,8 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
return __bs;
|
||||
}
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__byte_err_string_.empty())
|
||||
throw range_error("wstring_convert: to_bytes error");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return __byte_err_string_;
|
||||
}
|
||||
|
||||
|
87
include/map
87
include/map
@@ -375,6 +375,8 @@ public:
|
||||
bool operator()(const _Key& __x, const _Key& __y) const
|
||||
{return static_cast<const _Compare&>(*this)(__x, __y);}
|
||||
|
||||
|
||||
|
||||
// bool operator()(const _Tp& __x, const _Tp& __y) const
|
||||
// {return static_cast<const _Compare&>(*this)(__x.first, __y.first);}
|
||||
// bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
|
||||
@@ -418,6 +420,8 @@ public:
|
||||
bool operator()(const _Key& __x, const _Key& __y) const
|
||||
{return comp(__x, __y);}
|
||||
|
||||
|
||||
|
||||
// bool operator()(const _Tp& __x, const _Tp& __y) const
|
||||
// {return comp(__x.first, __y.first);}
|
||||
// bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
|
||||
@@ -455,7 +459,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__map_node_destructor(__tree_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -463,7 +467,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
@@ -672,7 +676,7 @@ public:
|
||||
insert(__m.begin(), __m.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
map(map&& __m)
|
||||
: __tree_(_STD::move(__m.__tree_))
|
||||
@@ -705,7 +709,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
explicit map(const allocator_type& __a)
|
||||
: __tree_(__a)
|
||||
@@ -738,7 +742,7 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
mapped_type& operator[](const key_type& __k);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
mapped_type& operator[](key_type&& __k);
|
||||
#endif
|
||||
|
||||
@@ -749,7 +753,7 @@ public:
|
||||
key_compare key_comp() const {return __tree_.value_comp().key_comp();}
|
||||
value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
pair<iterator, bool>
|
||||
emplace() {return __tree_.__emplace_unique();}
|
||||
@@ -760,15 +764,11 @@ public:
|
||||
emplace(_A0&& __a0)
|
||||
{return __tree_.__emplace_unique(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
pair<iterator, bool>
|
||||
emplace(_A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator
|
||||
emplace_hint(const_iterator __p)
|
||||
{return __tree_.__emplace_hint_unique(__p.__i_);}
|
||||
@@ -779,15 +779,11 @@ public:
|
||||
emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __tree_.__emplace_hint_unique(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
pair<iterator, bool> insert(_P&& __p)
|
||||
@@ -798,7 +794,7 @@ public:
|
||||
iterator insert(const_iterator __pos, _P&& __p)
|
||||
{return __tree_.__insert_unique(__pos.__i_, _STD::forward<_P>(__p));}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
pair<iterator, bool>
|
||||
insert(const value_type& __v) {return __tree_.__insert_unique(__v);}
|
||||
@@ -853,17 +849,15 @@ private:
|
||||
typedef __map_node_destructor<__node_allocator> _D;
|
||||
typedef unique_ptr<__node, _D> __node_holder;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__node_holder __construct_node();
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&& ...__args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
__node_holder __construct_node(const key_type& __k);
|
||||
#endif
|
||||
|
||||
@@ -1026,7 +1020,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__find_equal_key(__node_base_const_pointer
|
||||
return const_cast<const __node_base_const_pointer&>(__parent->__left_);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a)
|
||||
@@ -1068,8 +1062,6 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
class>
|
||||
@@ -1085,9 +1077,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& ...__
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder
|
||||
@@ -1102,7 +1092,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(const key_type& __k)
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1120,7 +1110,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
|
||||
return __r->__value_.second;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1138,7 +1128,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k)
|
||||
return __r->__value_.second;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1146,10 +1136,8 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k)
|
||||
{
|
||||
__node_base_pointer __parent;
|
||||
__node_base_pointer& __child = __find_equal_key(__parent, __k);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__child == nullptr)
|
||||
throw out_of_range("map::at: key not found");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return static_cast<__node_pointer>(__child)->__value_.second;
|
||||
}
|
||||
|
||||
@@ -1159,14 +1147,12 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
|
||||
{
|
||||
__node_base_const_pointer __parent;
|
||||
__node_base_const_pointer __child = __find_equal_key(__parent, __k);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__child == nullptr)
|
||||
throw out_of_range("map::at: key not found");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return static_cast<__node_const_pointer>(__child)->__value_.second;
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
@@ -1199,7 +1185,7 @@ map<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
inline
|
||||
@@ -1346,7 +1332,7 @@ public:
|
||||
insert(__m.begin(), __m.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
multimap(multimap&& __m)
|
||||
: __tree_(_STD::move(__m.__tree_))
|
||||
@@ -1378,7 +1364,7 @@ public:
|
||||
__tree_.__assign_multi(__il.begin(), __il.end());
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
explicit multimap(const allocator_type& __a)
|
||||
: __tree_(__a)
|
||||
@@ -1414,7 +1400,7 @@ public:
|
||||
key_compare key_comp() const {return __tree_.value_comp().key_comp();}
|
||||
value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
iterator emplace() {return __tree_.__emplace_multi();}
|
||||
|
||||
@@ -1424,15 +1410,11 @@ public:
|
||||
emplace(_A0&& __a0)
|
||||
{return __tree_.__emplace_multi(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace(_A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator __p)
|
||||
{return __tree_.__emplace_hint_multi(__p.__i_);}
|
||||
|
||||
@@ -1442,15 +1424,11 @@ public:
|
||||
emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __tree_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(_P&& __p)
|
||||
@@ -1461,7 +1439,7 @@ public:
|
||||
iterator insert(const_iterator __pos, _P&& __p)
|
||||
{return __tree_.__insert_multi(__pos.__i_, _STD::forward<_P>(__p));}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);}
|
||||
|
||||
@@ -1511,20 +1489,18 @@ private:
|
||||
typedef __map_node_destructor<__node_allocator> _D;
|
||||
typedef unique_ptr<__node, _D> __node_holder;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__node_holder __construct_node();
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&& ...__args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a)
|
||||
@@ -1567,8 +1543,6 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -1585,10 +1559,9 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&&
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
@@ -1620,7 +1593,7 @@ multimap<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
inline
|
||||
|
1046
include/memory
1046
include/memory
File diff suppressed because it is too large
Load Diff
@@ -330,7 +330,7 @@ try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
template <class _L0, class _L1>
|
||||
void
|
||||
@@ -413,7 +413,7 @@ lock(_L0& __l0, _L1& __l1, _L2& ...__l2)
|
||||
__lock_first(0, __l0, __l1, __l2...);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
struct once_flag;
|
||||
|
||||
@@ -422,12 +422,12 @@ struct once_flag;
|
||||
template<class _Callable, class... _Args>
|
||||
void call_once(once_flag&, _Callable&&, _Args&&...);
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
template<class _Callable>
|
||||
void call_once(once_flag&, _Callable);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
struct once_flag
|
||||
{
|
||||
@@ -444,11 +444,11 @@ private:
|
||||
template<class _Callable, class... _Args>
|
||||
friend
|
||||
void call_once(once_flag&, _Callable&&, _Args&&...);
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
template<class _Callable>
|
||||
friend
|
||||
void call_once(once_flag&, _Callable);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _F>
|
||||
@@ -456,7 +456,7 @@ class __call_once_param
|
||||
{
|
||||
_F __f_;
|
||||
public:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit __call_once_param(_F&& __f) : __f_(_STD::move(__f)) {}
|
||||
#else
|
||||
explicit __call_once_param(const _F& __f) : __f_(__f) {}
|
||||
@@ -495,7 +495,7 @@ call_once(once_flag& __flag, _Callable&& __func, _Args&&... __args)
|
||||
}
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
template<class _Callable>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -509,7 +509,7 @@ call_once(once_flag& __flag, _Callable __func)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -65,7 +65,7 @@ class _LIBCPP_EXCEPTION_ABI bad_alloc
|
||||
: public exception
|
||||
{
|
||||
public:
|
||||
bad_alloc() throw();
|
||||
bad_alloc() throw();
|
||||
virtual ~bad_alloc() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
132
include/ostream
132
include/ostream
@@ -153,12 +153,12 @@ public:
|
||||
explicit basic_ostream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_ostream();
|
||||
protected:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ostream(basic_ostream&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.7.2.3 Assign/swap
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ostream& operator=(basic_ostream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ostream& __rhs);
|
||||
@@ -242,7 +242,7 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
if (__os_.rdbuf()->pubsync() == -1)
|
||||
__os_.setstate(ios_base::badbit);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -250,7 +250,7 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry()
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambuf<char_type, traits_
|
||||
this->init(__sb);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -279,7 +279,7 @@ basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_ostream<_CharT, _Traits>::~basic_ostream()
|
||||
@@ -328,7 +328,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_typ
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -337,7 +337,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_typ
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef istreambuf_iterator<_CharT, _Traits> _I;
|
||||
typedef ostreambuf_iterator<_CharT, _Traits> _O;
|
||||
_I __i(__sb);
|
||||
@@ -358,7 +358,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_typ
|
||||
{
|
||||
this->__set_failbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
else
|
||||
this->setstate(ios_base::badbit);
|
||||
@@ -369,7 +369,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_typ
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ basic_ostream<_CharT, _Traits>::operator<<(bool __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -395,7 +395,7 @@ basic_ostream<_CharT, _Traits>::operator<<(bool __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ basic_ostream<_CharT, _Traits>::operator<<(short __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -425,7 +425,7 @@ basic_ostream<_CharT, _Traits>::operator<<(short __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned short __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -451,7 +451,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned short __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ basic_ostream<_CharT, _Traits>::operator<<(int __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -481,7 +481,7 @@ basic_ostream<_CharT, _Traits>::operator<<(int __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned int __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -507,7 +507,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned int __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -533,7 +533,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -559,7 +559,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long long __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -585,7 +585,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long long __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -596,7 +596,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -611,7 +611,7 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ basic_ostream<_CharT, _Traits>::operator<<(float __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -637,7 +637,7 @@ basic_ostream<_CharT, _Traits>::operator<<(float __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ basic_ostream<_CharT, _Traits>::operator<<(double __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -663,7 +663,7 @@ basic_ostream<_CharT, _Traits>::operator<<(double __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long double __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -689,7 +689,7 @@ basic_ostream<_CharT, _Traits>::operator<<(long double __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -700,7 +700,7 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -715,7 +715,7 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -726,7 +726,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -747,7 +747,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -780,7 +780,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ operator<<(basic_ostream<char, _Traits>& __os, char __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -812,7 +812,7 @@ operator<<(basic_ostream<char, _Traits>& __os, char __c)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -823,7 +823,7 @@ operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -844,7 +844,7 @@ operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -855,7 +855,7 @@ operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -876,7 +876,7 @@ operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -909,7 +909,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -920,7 +920,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -955,7 +955,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -988,7 +988,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -999,7 +999,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -1021,7 +1021,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -1032,7 +1032,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<char, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -1054,7 +1054,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ basic_ostream<_CharT, _Traits>::put(char_type __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __s(*this);
|
||||
if (__s)
|
||||
{
|
||||
@@ -1081,7 +1081,7 @@ basic_ostream<_CharT, _Traits>::put(char_type __c)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
sentry __sen(*this);
|
||||
if (__sen && __n)
|
||||
{
|
||||
@@ -1114,7 +1114,7 @@ basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1125,7 +1125,7 @@ basic_ostream<_CharT, _Traits>::flush()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
if (this->rdbuf())
|
||||
{
|
||||
sentry __s(*this);
|
||||
@@ -1141,7 +1141,7 @@ basic_ostream<_CharT, _Traits>::flush()
|
||||
{
|
||||
this->__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1206,7 +1206,7 @@ flush(basic_ostream<_CharT, _Traits>& __os)
|
||||
return __os;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Stream, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1222,7 +1222,7 @@ operator<<(_Stream&& __os, const _Tp& __x)
|
||||
return __os;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
@@ -1232,7 +1232,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
|
||||
if (__s)
|
||||
{
|
||||
@@ -1254,7 +1254,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
{
|
||||
__os.__set_badbit_and_consider_rethrow();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __os;
|
||||
}
|
||||
|
||||
|
@@ -182,10 +182,10 @@ protected:
|
||||
public:
|
||||
queue() : c() {}
|
||||
explicit queue(const container_type& __c) : c(__c) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit queue(container_type&& __c) : c(_STD::move(__c)) {}
|
||||
queue(queue&& __q) : c(_STD::move(__q.c)) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _Alloc>
|
||||
explicit queue(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(__c, __a) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Alloc>
|
||||
queue(container_type&& __c, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
c = _STD::move(__q.c);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
@@ -229,14 +229,12 @@ public:
|
||||
const_reference back() const {return c.back();}
|
||||
|
||||
void push(const value_type& __v) {c.push_back(__v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push(value_type&& __v) {c.push_back(_STD::move(__v));}
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace(_Args&&... __args)
|
||||
{c.emplace_back(_STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void pop() {c.pop_front();}
|
||||
|
||||
void swap(queue& __q)
|
||||
@@ -249,7 +247,7 @@ public:
|
||||
friend
|
||||
bool
|
||||
operator==(const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
|
||||
|
||||
|
||||
template <class _T1, class _C1>
|
||||
friend
|
||||
bool
|
||||
@@ -338,7 +336,7 @@ public:
|
||||
explicit priority_queue(const value_compare& __comp = value_compare())
|
||||
: c(), comp(__comp) {}
|
||||
priority_queue(const value_compare& __comp, const container_type& __c);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit priority_queue(const value_compare& __comp, container_type&& __c);
|
||||
#endif
|
||||
template <class _InputIter>
|
||||
@@ -347,13 +345,13 @@ public:
|
||||
template <class _InputIter>
|
||||
priority_queue(_InputIter __f, _InputIter __l,
|
||||
const value_compare& __comp, const container_type& __c);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _InputIter>
|
||||
priority_queue(_InputIter __f, _InputIter __l,
|
||||
const value_compare& __comp, container_type&& __c);
|
||||
priority_queue(priority_queue&& __q);
|
||||
priority_queue& operator=(priority_queue&& __q);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _Alloc>
|
||||
explicit priority_queue(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -371,7 +369,7 @@ public:
|
||||
priority_queue(const priority_queue& __q, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Alloc>
|
||||
priority_queue(const value_compare& __comp, container_type&& __c,
|
||||
const _Alloc& __a,
|
||||
@@ -381,19 +379,17 @@ public:
|
||||
priority_queue(priority_queue&& __q, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
const_reference top() const {return c.front();}
|
||||
|
||||
void push(const value_type& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push(value_type&& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace(_Args&&... __args);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void pop();
|
||||
|
||||
void swap(priority_queue& __q);
|
||||
@@ -409,7 +405,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -421,7 +417,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _InputIter>
|
||||
@@ -447,7 +443,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _InputIter>
|
||||
@@ -479,7 +475,7 @@ priority_queue<_Tp, _Container, _Compare>::operator=(priority_queue&& __q)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _Alloc>
|
||||
@@ -530,7 +526,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue&
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _Alloc>
|
||||
@@ -546,6 +542,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _Alloc>
|
||||
inline
|
||||
@@ -559,7 +556,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -570,7 +567,7 @@ priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -581,8 +578,6 @@ priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class... _Args>
|
||||
inline
|
||||
@@ -593,8 +588,7 @@ priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
|
120
include/random
120
include/random
@@ -485,7 +485,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const uniform_int_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -544,7 +544,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const uniform_real_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -599,7 +599,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const bernoulli_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -657,7 +657,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const binomial_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -713,7 +713,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const geometric_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -771,7 +771,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const negative_binomial_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -827,7 +827,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const poisson_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -883,7 +883,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const exponential_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -941,7 +941,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const gamma_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -999,7 +999,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const weibull_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1057,7 +1057,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const extreme_value_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1115,7 +1115,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const normal_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1173,7 +1173,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const lognormal_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1229,7 +1229,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const chi_squared_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1287,7 +1287,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const cauchy_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1345,7 +1345,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const fisher_f_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1401,7 +1401,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const student_t_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1468,7 +1468,7 @@ public:
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const discrete_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1543,7 +1543,7 @@ class piecewise_constant_distribution
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const piecewise_constant_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1585,7 +1585,7 @@ class piecewise_linear_distribution
|
||||
piecewise_linear_distribution(InputIteratorB firstB,
|
||||
InputIteratorB lastB,
|
||||
InputIteratorW firstW);
|
||||
|
||||
|
||||
template<class UnaryOperation>
|
||||
piecewise_linear_distribution(initializer_list<result_type> bl,
|
||||
UnaryOperation fw);
|
||||
@@ -1621,7 +1621,7 @@ class piecewise_linear_distribution
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os,
|
||||
const piecewise_linear_distribution& x);
|
||||
|
||||
|
||||
template <class charT, class traits>
|
||||
friend
|
||||
basic_istream<charT, traits>&
|
||||
@@ -1882,7 +1882,7 @@ private:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const linear_congruential_engine<_U, _A, _C, _N>&);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _U, _U _A, _U _C, _U _N>
|
||||
friend
|
||||
@@ -2100,7 +2100,7 @@ public:
|
||||
_B, _T, _C, _L, _F>& __x,
|
||||
const mersenne_twister_engine<_UI, _W, _N, _M, _R, _A, _U, _D, _S,
|
||||
_B, _T, _C, _L, _F>& __y);
|
||||
|
||||
|
||||
template <class _UI, size_t _W, size_t _N, size_t _M, size_t _R,
|
||||
_UI _A, size_t _U, _UI _D, size_t _S,
|
||||
_UI _B, size_t _T, _UI _C, size_t _L, _UI _F>
|
||||
@@ -2457,21 +2457,21 @@ public:
|
||||
operator==(
|
||||
const subtract_with_carry_engine<_UI, _W, _S, _R>& __x,
|
||||
const subtract_with_carry_engine<_UI, _W, _S, _R>& __y);
|
||||
|
||||
|
||||
template<class _UI, size_t _W, size_t _S, size_t _R>
|
||||
friend
|
||||
bool
|
||||
operator!=(
|
||||
const subtract_with_carry_engine<_UI, _W, _S, _R>& __x,
|
||||
const subtract_with_carry_engine<_UI, _W, _S, _R>& __y);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _UI, size_t _W, size_t _S, size_t _R>
|
||||
friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const subtract_with_carry_engine<_UI, _W, _S, _R>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _UI, size_t _W, size_t _S, size_t _R>
|
||||
friend
|
||||
@@ -2685,10 +2685,10 @@ public:
|
||||
discard_block_engine() : __n_(0) {}
|
||||
explicit discard_block_engine(const _Engine& __e)
|
||||
: __e_(__e), __n_(0) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit discard_block_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)), __n_(0) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
||||
template<class _Sseq> explicit discard_block_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
@@ -2717,21 +2717,21 @@ public:
|
||||
operator==(
|
||||
const discard_block_engine<_Eng, _P, _R>& __x,
|
||||
const discard_block_engine<_Eng, _P, _R>& __y);
|
||||
|
||||
|
||||
template<class _Eng, size_t _P, size_t _R>
|
||||
friend
|
||||
bool
|
||||
operator!=(
|
||||
const discard_block_engine<_Eng, _P, _R>& __x,
|
||||
const discard_block_engine<_Eng, _P, _R>& __y);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _P, size_t _R>
|
||||
friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const discard_block_engine<_Eng, _P, _R>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _P, size_t _R>
|
||||
friend
|
||||
@@ -2872,10 +2872,10 @@ public:
|
||||
independent_bits_engine() {}
|
||||
explicit independent_bits_engine(const _Engine& __e)
|
||||
: __e_(__e) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit independent_bits_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
||||
template<class _Sseq> explicit independent_bits_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
@@ -2904,21 +2904,21 @@ public:
|
||||
operator==(
|
||||
const independent_bits_engine<_Eng, _W, _UI>& __x,
|
||||
const independent_bits_engine<_Eng, _W, _UI>& __y);
|
||||
|
||||
|
||||
template<class _Eng, size_t _W, class _UI>
|
||||
friend
|
||||
bool
|
||||
operator!=(
|
||||
const independent_bits_engine<_Eng, _W, _UI>& __x,
|
||||
const independent_bits_engine<_Eng, _W, _UI>& __y);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _W, class _UI>
|
||||
friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const independent_bits_engine<_Eng, _W, _UI>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _W, class _UI>
|
||||
friend
|
||||
@@ -3067,7 +3067,7 @@ private:
|
||||
public:
|
||||
// engine characteristics
|
||||
static const/*expr*/ size_t table_size = __k;
|
||||
|
||||
|
||||
static const result_type _Min = _Engine::_Min;
|
||||
static const result_type _Max = _Engine::_Max;
|
||||
static_assert(_Min < _Max, "shuffle_order_engine invalid parameters");
|
||||
@@ -3080,10 +3080,10 @@ public:
|
||||
shuffle_order_engine() {__init();}
|
||||
explicit shuffle_order_engine(const _Engine& __e)
|
||||
: __e_(__e) {__init();}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit shuffle_order_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)) {__init();}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
||||
template<class _Sseq> explicit shuffle_order_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
@@ -3113,21 +3113,21 @@ private:
|
||||
operator==(
|
||||
const shuffle_order_engine<_Eng, _K>& __x,
|
||||
const shuffle_order_engine<_Eng, _K>& __y);
|
||||
|
||||
|
||||
template<class _Eng, size_t _K>
|
||||
friend
|
||||
bool
|
||||
operator!=(
|
||||
const shuffle_order_engine<_Eng, _K>& __x,
|
||||
const shuffle_order_engine<_Eng, _K>& __y);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _K>
|
||||
friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const shuffle_order_engine<_Eng, _K>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits,
|
||||
class _Eng, size_t _K>
|
||||
friend
|
||||
@@ -3297,7 +3297,7 @@ public:
|
||||
seed_seq() {}
|
||||
template<class _Tp>
|
||||
seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());}
|
||||
|
||||
|
||||
template<class _InputIterator>
|
||||
seed_seq(_InputIterator __first, _InputIterator __last)
|
||||
{init(__first, __last);}
|
||||
@@ -3955,7 +3955,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const normal_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -4068,7 +4068,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const lognormal_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -4115,7 +4115,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const lognormal_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -4413,6 +4413,7 @@ public:
|
||||
result_type min() const {return 0;}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
|
||||
|
||||
friend bool operator==(const weibull_distribution& __x,
|
||||
const weibull_distribution& __y)
|
||||
{return __x.__p_ == __y.__p_;}
|
||||
@@ -4606,7 +4607,7 @@ public:
|
||||
void param(const param_type& __p) {__p_ = __p;}
|
||||
|
||||
result_type min() const {return 0;}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
|
||||
friend bool operator==(const gamma_distribution& __x,
|
||||
const gamma_distribution& __y)
|
||||
@@ -4958,7 +4959,8 @@ public:
|
||||
void param(const param_type& __p) {__p_ = __p;}
|
||||
|
||||
result_type min() const {return 0;}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
|
||||
|
||||
friend bool operator==(const chi_squared_distribution& __x,
|
||||
const chi_squared_distribution& __y)
|
||||
@@ -5049,7 +5051,7 @@ public:
|
||||
void param(const param_type& __p) {__p_ = __p;}
|
||||
|
||||
result_type min() const {return -numeric_limits<result_type>::infinity();}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
|
||||
friend bool operator==(const cauchy_distribution& __x,
|
||||
const cauchy_distribution& __y)
|
||||
@@ -5154,7 +5156,7 @@ public:
|
||||
void param(const param_type& __p) {__p_ = __p;}
|
||||
|
||||
result_type min() const {return 0;}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
result_type max() const {return numeric_limits<result_type>::infinity();}
|
||||
|
||||
friend bool operator==(const fisher_f_distribution& __x,
|
||||
const fisher_f_distribution& __y)
|
||||
@@ -5345,7 +5347,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const discrete_distribution<_IT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _IT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -5398,7 +5400,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const discrete_distribution<_IT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _IT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -5556,7 +5558,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const piecewise_constant_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -5618,7 +5620,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const piecewise_constant_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -5633,7 +5635,7 @@ piecewise_constant_distribution<_RealType>::param_type::__init()
|
||||
// __densities_ contains non-normalized areas
|
||||
__area_type __total_area = _STD::accumulate(__densities_.begin(),
|
||||
__densities_.end(),
|
||||
__area_type());
|
||||
__area_type());
|
||||
for (size_t __i = 0; __i < __densities_.size(); ++__i)
|
||||
__densities_[__i] /= __total_area;
|
||||
// __densities_ contains normalized areas
|
||||
@@ -5837,7 +5839,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const piecewise_linear_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -5856,7 +5858,7 @@ public:
|
||||
_InputIteratorB __lB,
|
||||
_InputIteratorW __fW)
|
||||
: __p_(__fB, __lB, __fW) {}
|
||||
|
||||
|
||||
template<class _UnaryOperation>
|
||||
piecewise_linear_distribution(initializer_list<result_type> __bl,
|
||||
_UnaryOperation __fw)
|
||||
@@ -5899,7 +5901,7 @@ public:
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os,
|
||||
const piecewise_linear_distribution<_RT>& __x);
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _RT>
|
||||
friend
|
||||
basic_istream<_CharT, _Traits>&
|
||||
@@ -6023,7 +6025,7 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
|
||||
return static_cast<result_type>(__u / __dk + __bk);
|
||||
const result_type __bk1 = __p.__b_[__k+1];
|
||||
const result_type __deltab = __bk1 - __bk;
|
||||
return static_cast<result_type>((__bk * __dk1 - __bk1 * __dk +
|
||||
return static_cast<result_type>((__bk * __dk1 - __bk1 * __dk +
|
||||
_STD::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) /
|
||||
__deltad);
|
||||
}
|
||||
|
@@ -335,11 +335,11 @@ public:
|
||||
|
||||
template <class _R1, class _R2>
|
||||
struct ratio_equal
|
||||
: public integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> {};
|
||||
: public integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> {};
|
||||
|
||||
template <class _R1, class _R2>
|
||||
struct ratio_not_equal
|
||||
: public integral_constant<bool, !ratio_equal<_R1, _R2>::value> {};
|
||||
: public integral_constant<bool, !ratio_equal<_R1, _R2>::value> {};
|
||||
|
||||
// ratio_less
|
||||
|
||||
|
4679
include/regex
4679
include/regex
File diff suppressed because it is too large
Load Diff
@@ -1,533 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
//===-------------------------- scoped_allocator --------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_SCOPED_ALLOCATOR
|
||||
#define _LIBCPP_SCOPED_ALLOCATOR
|
||||
|
||||
/*
|
||||
scoped_allocator synopsis
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <class OuterAlloc, class... InnerAllocs>
|
||||
class scoped_allocator_adaptor : public OuterAlloc
|
||||
{
|
||||
typedef allocator_traits<OuterAlloc> OuterTraits; // exposition only
|
||||
scoped_allocator_adaptor<InnerAllocs...> inner; // exposition only
|
||||
public:
|
||||
|
||||
typedef OuterAlloc outer_allocator_type;
|
||||
typedef see below inner_allocator_type;
|
||||
|
||||
typedef typename OuterTraits::value_type value_type;
|
||||
typedef typename OuterTraits::size_type size_type;
|
||||
typedef typename OuterTraits::difference_type difference_type;
|
||||
typedef typename OuterTraits::pointer pointer;
|
||||
typedef typename OuterTraits::const_pointer const_pointer;
|
||||
typedef typename OuterTraits::void_pointer void_pointer;
|
||||
typedef typename OuterTraits::const_void_pointer const_void_pointer;
|
||||
|
||||
typedef see below propagate_on_container_copy_assignment;
|
||||
typedef see below propagate_on_container_move_assignment;
|
||||
typedef see below propagate_on_container_swap;
|
||||
|
||||
template <class Tp>
|
||||
struct rebind
|
||||
{
|
||||
typedef scoped_allocator_adaptor<
|
||||
OuterTraits::template rebind_alloc<Tp>, InnerAllocs...> other;
|
||||
};
|
||||
|
||||
scoped_allocator_adaptor();
|
||||
template <class OuterA2>
|
||||
scoped_allocator_adaptor(OuterA2&& outerAlloc,
|
||||
const InnerAllocs&... innerAllocs);
|
||||
scoped_allocator_adaptor(const scoped_allocator_adaptor& other);
|
||||
template <class OuterA2>
|
||||
scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other);
|
||||
template <class OuterA2>
|
||||
scoped_allocator_adaptor(const scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other);
|
||||
|
||||
~scoped_allocator_adaptor();
|
||||
|
||||
inner_allocator_type& inner_allocator();
|
||||
const inner_allocator_type& inner_allocator() const;
|
||||
|
||||
outer_allocator_type& outer_allocator();
|
||||
const outer_allocator_type& outer_allocator() const;
|
||||
|
||||
pointer allocate(size_type n);
|
||||
pointer allocate(size_type n, const_void_pointer hint);
|
||||
void deallocate(pointer p, size_type n);
|
||||
|
||||
size_type max_size() const;
|
||||
template <class T, class... Args> void construct(T* p, Args&& args);
|
||||
template <class T1, class T2, class... Args1, class... Args2>
|
||||
void construct(pair<T1, T2>* p, piecewise_construct t, tuple<Args1...> x,
|
||||
tuple<Args2...> y);
|
||||
template <class T1, class T2>
|
||||
void construct(pair<T1, T2>* p);
|
||||
template <class T1, class T2, class U, class V>
|
||||
void construct(pair<T1, T2>* p, U&& x, V&& y);
|
||||
template <class T1, class T2, class U, class V>
|
||||
void construct(pair<T1, T2>* p, const pair<U, V>& x);
|
||||
template <class T1, class T2, class U, class V>
|
||||
void construct(pair<T1, T2>* p, pair<U, V>&& x);
|
||||
template <class T> void destroy(T* p);
|
||||
|
||||
scoped_allocator_adaptor select_on_container_copy_construction() const;
|
||||
};
|
||||
|
||||
template <class OuterA1, class OuterA2, class... InnerAllocs>
|
||||
bool
|
||||
operator==(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
|
||||
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b);
|
||||
|
||||
template <class OuterA1, class OuterA2, class... InnerAllocs>
|
||||
bool
|
||||
operator!=(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
|
||||
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b);
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <memory>
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
// scoped_allocator_adaptor
|
||||
|
||||
template <class ..._Allocs>
|
||||
class scoped_allocator_adaptor;
|
||||
|
||||
template <class ..._Allocs> struct __get_poc_copy_assignment;
|
||||
|
||||
template <class _A0>
|
||||
struct __get_poc_copy_assignment<_A0>
|
||||
{
|
||||
static const bool value = allocator_traits<_A0>::
|
||||
propagate_on_container_copy_assignment::value;
|
||||
};
|
||||
|
||||
template <class _A0, class ..._Allocs>
|
||||
struct __get_poc_copy_assignment<_A0, _Allocs...>
|
||||
{
|
||||
static const bool value =
|
||||
allocator_traits<_A0>::propagate_on_container_copy_assignment::value ||
|
||||
__get_poc_copy_assignment<_Allocs...>::value;
|
||||
};
|
||||
|
||||
template <class ..._Allocs> struct __get_poc_move_assignment;
|
||||
|
||||
template <class _A0>
|
||||
struct __get_poc_move_assignment<_A0>
|
||||
{
|
||||
static const bool value = allocator_traits<_A0>::
|
||||
propagate_on_container_move_assignment::value;
|
||||
};
|
||||
|
||||
template <class _A0, class ..._Allocs>
|
||||
struct __get_poc_move_assignment<_A0, _Allocs...>
|
||||
{
|
||||
static const bool value =
|
||||
allocator_traits<_A0>::propagate_on_container_move_assignment::value ||
|
||||
__get_poc_move_assignment<_Allocs...>::value;
|
||||
};
|
||||
|
||||
template <class ..._Allocs> struct __get_poc_swap;
|
||||
|
||||
template <class _A0>
|
||||
struct __get_poc_swap<_A0>
|
||||
{
|
||||
static const bool value = allocator_traits<_A0>::
|
||||
propagate_on_container_swap::value;
|
||||
};
|
||||
|
||||
template <class _A0, class ..._Allocs>
|
||||
struct __get_poc_swap<_A0, _Allocs...>
|
||||
{
|
||||
static const bool value =
|
||||
allocator_traits<_A0>::propagate_on_container_swap::value ||
|
||||
__get_poc_swap<_Allocs...>::value;
|
||||
};
|
||||
|
||||
template <class ..._Allocs>
|
||||
class __scoped_allocator_storage;
|
||||
|
||||
template <class _OuterAlloc, class... _InnerAllocs>
|
||||
class __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...>
|
||||
: public _OuterAlloc
|
||||
{
|
||||
typedef _OuterAlloc outer_allocator_type;
|
||||
protected:
|
||||
typedef scoped_allocator_adaptor<_InnerAllocs...> inner_allocator_type;
|
||||
|
||||
private:
|
||||
inner_allocator_type __inner_;
|
||||
|
||||
protected:
|
||||
|
||||
__scoped_allocator_storage() {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(_OuterA2&& __outerAlloc,
|
||||
const _InnerAllocs& ...__innerAllocs)
|
||||
: outer_allocator_type(_STD::forward<_OuterA2>(__outerAlloc)),
|
||||
__inner_(__innerAllocs...) {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, const _OuterA2&>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(
|
||||
const __scoped_allocator_storage<_OuterA2, _InnerAllocs...>& __other)
|
||||
: outer_allocator_type(__other.outer_allocator()),
|
||||
__inner_(__other.inner_allocator()) {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(
|
||||
__scoped_allocator_storage<_OuterA2, _InnerAllocs...>&& __other)
|
||||
: outer_allocator_type(_STD::move(__other.outer_allocator())),
|
||||
__inner_(_STD::move(__other.inner_allocator())) {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(_OuterA2&& __o,
|
||||
const inner_allocator_type& __i)
|
||||
: outer_allocator_type(_STD::forward<_OuterA2>(__o)),
|
||||
__inner_(__i)
|
||||
{
|
||||
}
|
||||
|
||||
inner_allocator_type& inner_allocator() {return __inner_;}
|
||||
const inner_allocator_type& inner_allocator() const {return __inner_;}
|
||||
|
||||
outer_allocator_type& outer_allocator()
|
||||
{return static_cast<outer_allocator_type&>(*this);}
|
||||
const outer_allocator_type& outer_allocator() const
|
||||
{return static_cast<const outer_allocator_type&>(*this);}
|
||||
|
||||
scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...>
|
||||
select_on_container_copy_construction() const
|
||||
{
|
||||
return scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...>
|
||||
(
|
||||
allocator_traits<outer_allocator_type>::
|
||||
select_on_container_copy_construction(outer_allocator()),
|
||||
allocator_traits<inner_allocator_type>::
|
||||
select_on_container_copy_construction(inner_allocator())
|
||||
);
|
||||
}
|
||||
|
||||
template <class...> friend class __scoped_allocator_storage;
|
||||
};
|
||||
|
||||
template <class _OuterAlloc>
|
||||
class __scoped_allocator_storage<_OuterAlloc>
|
||||
: public _OuterAlloc
|
||||
{
|
||||
typedef _OuterAlloc outer_allocator_type;
|
||||
protected:
|
||||
typedef scoped_allocator_adaptor<_OuterAlloc> inner_allocator_type;
|
||||
|
||||
__scoped_allocator_storage() {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(_OuterA2&& __outerAlloc)
|
||||
: outer_allocator_type(_STD::forward<_OuterA2>(__outerAlloc)) {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, const _OuterA2&>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(
|
||||
const __scoped_allocator_storage<_OuterA2>& __other)
|
||||
: outer_allocator_type(__other.outer_allocator()) {}
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
__scoped_allocator_storage(
|
||||
__scoped_allocator_storage<_OuterA2>&& __other)
|
||||
: outer_allocator_type(_STD::move(__other.outer_allocator())) {}
|
||||
|
||||
inner_allocator_type& inner_allocator()
|
||||
{return static_cast<inner_allocator_type&>(*this);}
|
||||
const inner_allocator_type& inner_allocator() const
|
||||
{return static_cast<const inner_allocator_type&>(*this);}
|
||||
|
||||
outer_allocator_type& outer_allocator()
|
||||
{return static_cast<outer_allocator_type&>(*this);}
|
||||
const outer_allocator_type& outer_allocator() const
|
||||
{return static_cast<const outer_allocator_type&>(*this);}
|
||||
|
||||
scoped_allocator_adaptor<outer_allocator_type>
|
||||
select_on_container_copy_construction() const
|
||||
{return scoped_allocator_adaptor<outer_allocator_type>(
|
||||
allocator_traits<outer_allocator_type>::
|
||||
select_on_container_copy_construction(outer_allocator())
|
||||
);}
|
||||
|
||||
__scoped_allocator_storage(const outer_allocator_type& __o,
|
||||
const inner_allocator_type& __i);
|
||||
|
||||
template <class...> friend class __scoped_allocator_storage;
|
||||
};
|
||||
|
||||
// __outermost
|
||||
|
||||
template <class _Alloc>
|
||||
decltype(declval<_Alloc>().outer_allocator(), true_type())
|
||||
__has_outer_allocator_test(_Alloc&& __a);
|
||||
|
||||
template <class _Alloc>
|
||||
false_type
|
||||
__has_outer_allocator_test(const volatile _Alloc& __a);
|
||||
|
||||
template <class _Alloc>
|
||||
struct __has_outer_allocator
|
||||
: public common_type
|
||||
<
|
||||
decltype(__has_outer_allocator_test(declval<_Alloc&>()))
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Alloc, bool = __has_outer_allocator<_Alloc>::value>
|
||||
struct __outermost
|
||||
{
|
||||
typedef _Alloc type;
|
||||
type& operator()(type& __a) const {return __a;}
|
||||
};
|
||||
|
||||
template <class _Alloc>
|
||||
struct __outermost<_Alloc, true>
|
||||
{
|
||||
typedef typename remove_reference
|
||||
<
|
||||
decltype(_STD::declval<_Alloc>().outer_allocator())
|
||||
>::type _OuterAlloc;
|
||||
typedef typename __outermost<_OuterAlloc>::type type;
|
||||
type& operator()(_Alloc& __a) const
|
||||
{return __outermost<_OuterAlloc>()(__a.outer_allocator());}
|
||||
};
|
||||
|
||||
template <class _OuterAlloc, class... _InnerAllocs>
|
||||
class scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
|
||||
: public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...>
|
||||
{
|
||||
typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> base;
|
||||
typedef allocator_traits<_OuterAlloc> _OuterTraits;
|
||||
public:
|
||||
typedef _OuterAlloc outer_allocator_type;
|
||||
typedef typename base::inner_allocator_type inner_allocator_type;
|
||||
typedef typename _OuterTraits::size_type size_type;
|
||||
typedef typename _OuterTraits::difference_type difference_type;
|
||||
typedef typename _OuterTraits::pointer pointer;
|
||||
typedef typename _OuterTraits::const_pointer const_pointer;
|
||||
typedef typename _OuterTraits::void_pointer void_pointer;
|
||||
typedef typename _OuterTraits::const_void_pointer const_void_pointer;
|
||||
|
||||
typedef integral_constant
|
||||
<
|
||||
bool,
|
||||
__get_poc_copy_assignment<outer_allocator_type,
|
||||
_InnerAllocs...>::value
|
||||
> propagate_on_container_copy_assignment;
|
||||
typedef integral_constant
|
||||
<
|
||||
bool,
|
||||
__get_poc_move_assignment<outer_allocator_type,
|
||||
_InnerAllocs...>::value
|
||||
> propagate_on_container_move_assignment;
|
||||
typedef integral_constant
|
||||
<
|
||||
bool,
|
||||
__get_poc_swap<outer_allocator_type, _InnerAllocs...>::value
|
||||
> propagate_on_container_swap;
|
||||
|
||||
template <class _Tp>
|
||||
struct rebind
|
||||
{
|
||||
typedef scoped_allocator_adaptor
|
||||
<
|
||||
typename _OuterTraits::template rebind_alloc<_Tp>, _InnerAllocs...
|
||||
> other;
|
||||
};
|
||||
|
||||
scoped_allocator_adaptor() {}
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
scoped_allocator_adaptor(_OuterA2&& __outerAlloc,
|
||||
const _InnerAllocs& ...__innerAllocs)
|
||||
: base(_STD::forward<_OuterA2>(__outerAlloc), __innerAllocs...) {}
|
||||
// scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default;
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, const _OuterA2&>::value
|
||||
>::type>
|
||||
scoped_allocator_adaptor(
|
||||
const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __other)
|
||||
: base(__other) {}
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
scoped_allocator_adaptor(
|
||||
scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>&& __other)
|
||||
: base(_STD::move(__other)) {}
|
||||
|
||||
// ~scoped_allocator_adaptor() = default;
|
||||
|
||||
inner_allocator_type& inner_allocator()
|
||||
{return base::inner_allocator();}
|
||||
const inner_allocator_type& inner_allocator() const
|
||||
{return base::inner_allocator();}
|
||||
|
||||
outer_allocator_type& outer_allocator()
|
||||
{return base::outer_allocator();}
|
||||
const outer_allocator_type& outer_allocator() const
|
||||
{return base::outer_allocator();}
|
||||
|
||||
pointer allocate(size_type __n)
|
||||
{return allocator_traits<outer_allocator_type>::
|
||||
allocate(outer_allocator(), __n);}
|
||||
pointer allocate(size_type __n, const_void_pointer __hint)
|
||||
{return allocator_traits<outer_allocator_type>::
|
||||
allocate(outer_allocator(), __n, __hint);}
|
||||
|
||||
void deallocate(pointer __p, size_type __n)
|
||||
{allocator_traits<outer_allocator_type>::
|
||||
deallocate(outer_allocator(), __p, __n);}
|
||||
|
||||
size_type max_size() const
|
||||
{allocator_traits<outer_allocator_type>::max_size(outer_allocator());}
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
void construct(_Tp* __p, _Args&& ...__args)
|
||||
{__construct(__uses_alloc_ctor<_Tp, inner_allocator_type, _Args...>(),
|
||||
__p, _STD::forward<_Args>(__args)...);}
|
||||
template <class _Tp>
|
||||
void destroy(_Tp* __p)
|
||||
{
|
||||
typedef __outermost<outer_allocator_type> _OM;
|
||||
allocator_traits<typename _OM::type>::
|
||||
destroy(_OM()(outer_allocator()), __p);
|
||||
}
|
||||
|
||||
scoped_allocator_adaptor select_on_container_copy_construction() const
|
||||
{return base::select_on_container_copy_construction();}
|
||||
|
||||
private:
|
||||
|
||||
template <class _OuterA2,
|
||||
class = typename enable_if<
|
||||
is_constructible<outer_allocator_type, _OuterA2>::value
|
||||
>::type>
|
||||
scoped_allocator_adaptor(_OuterA2&& __o,
|
||||
const inner_allocator_type& __i)
|
||||
: base(_STD::forward<_OuterA2>(__o), __i) {}
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
void __construct(integral_constant<int, 0>, _Tp* __p, _Args&& ...__args)
|
||||
{
|
||||
typedef __outermost<outer_allocator_type> _OM;
|
||||
allocator_traits<typename _OM::type>::construct
|
||||
(
|
||||
_OM()(outer_allocator()),
|
||||
__p,
|
||||
_STD::forward<_Args>(__args)...
|
||||
);
|
||||
}
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
void __construct(integral_constant<int, 1>, _Tp* __p, _Args&& ...__args)
|
||||
{
|
||||
typedef __outermost<outer_allocator_type> _OM;
|
||||
allocator_traits<typename _OM::type>::construct
|
||||
(
|
||||
_OM()(outer_allocator()),
|
||||
__p,
|
||||
allocator_arg,
|
||||
inner_allocator(),
|
||||
_STD::forward<_Args>(__args)...
|
||||
);
|
||||
}
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
void __construct(integral_constant<int, 2>, _Tp* __p, _Args&& ...__args)
|
||||
{
|
||||
typedef __outermost<outer_allocator_type> _OM;
|
||||
allocator_traits<typename _OM::type>::construct
|
||||
(
|
||||
_OM()(outer_allocator()),
|
||||
__p,
|
||||
_STD::forward<_Args>(__args)...,
|
||||
inner_allocator()
|
||||
);
|
||||
}
|
||||
|
||||
template <class...> friend class __scoped_allocator_storage;
|
||||
};
|
||||
|
||||
template <class _OuterA1, class _OuterA2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const scoped_allocator_adaptor<_OuterA1>& __a,
|
||||
const scoped_allocator_adaptor<_OuterA2>& __b)
|
||||
{
|
||||
return __a.outer_allocator() == __b.outer_allocator();
|
||||
}
|
||||
|
||||
template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator==(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
|
||||
const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __b)
|
||||
{
|
||||
return __a.outer_allocator() == __b.outer_allocator() &&
|
||||
__a.inner_allocator() == __b.inner_allocator();
|
||||
}
|
||||
|
||||
template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
|
||||
const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __b)
|
||||
{
|
||||
return !(__a == __b);
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_SCOPED_ALLOCATOR
|
55
include/set
55
include/set
@@ -157,6 +157,7 @@ template <class Key, class Compare, class Allocator>
|
||||
void
|
||||
swap(set<Key, Compare, Allocator>& x, set<Key, Compare, Allocator>& y);
|
||||
|
||||
|
||||
template <class Key, class Compare = less<Key>,
|
||||
class Allocator = allocator<Key>>
|
||||
class multiset
|
||||
@@ -365,10 +366,10 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
set(set&& __s)
|
||||
: __tree_(_STD::move(__s.__tree_)) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
explicit set(const allocator_type& __a)
|
||||
: __tree_(__a) {}
|
||||
@@ -379,7 +380,7 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
set(set&& __s, const allocator_type& __a);
|
||||
#endif
|
||||
|
||||
@@ -402,13 +403,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
set& operator=(set&& __s)
|
||||
{
|
||||
__tree_ = _STD::move(__s.__tree_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
iterator begin() {return __tree_.begin();}
|
||||
const_iterator begin() const {return __tree_.begin();}
|
||||
@@ -430,26 +431,26 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
// modifiers:
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> emplace(_Args&&... __args)
|
||||
{return __tree_.__emplace_unique(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __tree_.__emplace_hint_unique(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
pair<iterator,bool> insert(const value_type& __v)
|
||||
{return __tree_.__insert_unique(__v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
pair<iterator,bool> insert(value_type&& __v)
|
||||
{return __tree_.__insert_unique(_STD::move(__v));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __v)
|
||||
{return __tree_.__insert_unique(__p, __v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(const_iterator __p, value_type&& __v)
|
||||
{return __tree_.__insert_unique(__p, _STD::move(__v));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __f, _InputIterator __l)
|
||||
{
|
||||
@@ -492,7 +493,7 @@ public:
|
||||
{return __tree_.__equal_range_unique(__k);}
|
||||
};
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
|
||||
@@ -506,7 +507,7 @@ set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
inline
|
||||
@@ -572,6 +573,7 @@ swap(set<_Key, _Compare, _Allocator>& __x,
|
||||
__x.swap(__y);
|
||||
}
|
||||
|
||||
|
||||
template <class _Key, class _Compare = less<_Key>,
|
||||
class _Allocator = allocator<_Key> >
|
||||
class multiset
|
||||
@@ -631,10 +633,10 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
multiset(multiset&& __s)
|
||||
: __tree_(_STD::move(__s.__tree_)) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
explicit multiset(const allocator_type& __a)
|
||||
: __tree_(__a) {}
|
||||
multiset(const multiset& __s, const allocator_type& __a)
|
||||
@@ -642,7 +644,7 @@ public:
|
||||
{
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
multiset(multiset&& __s, const allocator_type& __a);
|
||||
#endif
|
||||
|
||||
@@ -665,13 +667,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
multiset& operator=(multiset&& __s)
|
||||
{
|
||||
__tree_ = _STD::move(__s.__tree_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
iterator begin() {return __tree_.begin();}
|
||||
const_iterator begin() const {return __tree_.begin();}
|
||||
@@ -693,26 +695,26 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
// modifiers:
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
iterator emplace(_Args&&... __args)
|
||||
{return __tree_.__emplace_multi(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __tree_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
iterator insert(const value_type& __v)
|
||||
{return __tree_.__insert_multi(__v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(value_type&& __v)
|
||||
{return __tree_.__insert_multi(_STD::move(__v));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __v)
|
||||
{return __tree_.__insert_multi(__p, __v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(const_iterator __p, value_type&& __v)
|
||||
{return __tree_.__insert_multi(_STD::move(__v));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __f, _InputIterator __l)
|
||||
{
|
||||
@@ -754,7 +756,7 @@ public:
|
||||
{return __tree_.__equal_range_multi(__k);}
|
||||
};
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a)
|
||||
@@ -768,7 +770,7 @@ multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_t
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
inline
|
||||
@@ -833,6 +835,7 @@ swap(multiset<_Key, _Compare, _Allocator>& __x,
|
||||
__x.swap(__y);
|
||||
}
|
||||
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_SET
|
||||
|
@@ -206,12 +206,12 @@ public:
|
||||
explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
explicit basic_stringbuf(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_stringbuf(basic_stringbuf&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.8.1.2 Assign and swap:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_stringbuf& operator=(basic_stringbuf&& __rhs);
|
||||
#endif
|
||||
void swap(basic_stringbuf& __rhs);
|
||||
@@ -250,7 +250,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type&
|
||||
str(__s);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs)
|
||||
@@ -298,7 +298,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
void
|
||||
@@ -434,7 +434,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::overflow(int_type __c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
ptrdiff_t __nout = this->pptr() - this->pbase();
|
||||
ptrdiff_t __hm = __hm_ - this->pbase();
|
||||
__str_.push_back(char_type());
|
||||
@@ -449,7 +449,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::overflow(int_type __c)
|
||||
{
|
||||
return traits_type::eof();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
__hm_ = max(this->pptr() + 1, __hm_);
|
||||
if (__mode_ & ios_base::in)
|
||||
@@ -546,12 +546,12 @@ public:
|
||||
explicit basic_istringstream(ios_base::openmode __wch = ios_base::in);
|
||||
explicit basic_istringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_istringstream(basic_istringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_istringstream& operator=(basic_istringstream&& __rhs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void swap(basic_istringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -577,7 +577,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -597,7 +597,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -665,12 +665,12 @@ public:
|
||||
explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out);
|
||||
explicit basic_ostringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::out);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_ostringstream(basic_ostringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_ostringstream& operator=(basic_ostringstream&& __rhs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void swap(basic_ostringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -696,7 +696,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -716,7 +716,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -784,12 +784,12 @@ public:
|
||||
explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
explicit basic_stringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_stringstream(basic_stringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_stringstream& operator=(basic_stringstream&& __rhs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void swap(basic_stringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -815,7 +815,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -835,7 +835,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
|
@@ -107,11 +107,11 @@ protected:
|
||||
public:
|
||||
stack() : c() {}
|
||||
explicit stack(const container_type& __c) : c(__c) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
explicit stack(container_type&& __c) : c(_STD::move(__c)) {}
|
||||
stack(stack&& __s) : c(_STD::move(__s.c)) {}
|
||||
stack& operator=(stack&& __s) {c = _STD::move(__s.c); return *this;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _Alloc>
|
||||
explicit stack(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(__s.c, __a) {}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Alloc>
|
||||
stack(container_type&& __c, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(_STD::move(__s.c), __a) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
@@ -146,13 +146,11 @@ public:
|
||||
const_reference top() const {return c.back();}
|
||||
|
||||
void push(const value_type& __v) {c.push_back(__v);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push(value_type&& __v) {c.push_back(_STD::move(__v));}
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace(_Args&&... __args)
|
||||
{c.emplace_back(_STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void pop() {c.pop_back();}
|
||||
|
||||
void swap(stack& __s)
|
||||
@@ -165,7 +163,7 @@ public:
|
||||
friend
|
||||
bool
|
||||
operator==(const stack<T1, _C1>& __x, const stack<T1, _C1>& __y);
|
||||
|
||||
|
||||
template <class T1, class _C1>
|
||||
friend
|
||||
bool
|
||||
|
44
include/stdbool.h
Normal file
44
include/stdbool.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- stdbool.h --------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_STDBOOL_H
|
||||
#define _LIBCPP_STDBOOL_H
|
||||
|
||||
/*
|
||||
stdbool.h synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
__bool_true_false_are_defined
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <__config>
|
||||
#endif
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#undef __bool_true_false_are_defined
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#define bool _Bool
|
||||
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3
|
||||
typedef int _Bool;
|
||||
#endif
|
||||
|
||||
#define false (bool)0
|
||||
#define true (bool)1
|
||||
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#endif // _LIBCPP_STDBOOL_H
|
@@ -155,6 +155,7 @@ public:
|
||||
virtual ~underflow_error() throw();
|
||||
};
|
||||
|
||||
|
||||
} // std
|
||||
|
||||
#endif // _LIBCPP_STDEXCEPT
|
||||
|
@@ -557,6 +557,7 @@ extern template class basic_streambuf<wchar_t>;
|
||||
extern template class basic_ios<char>;
|
||||
extern template class basic_ios<wchar_t>;
|
||||
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_STEAMBUF
|
||||
|
@@ -71,11 +71,11 @@ struct char_traits
|
||||
template <> struct char_traits<char>;
|
||||
template <> struct char_traits<wchar_t>;
|
||||
|
||||
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
class basic_string
|
||||
{
|
||||
public:
|
||||
// types:
|
||||
public:
|
||||
// types:
|
||||
typedef traits traits_type;
|
||||
typedef typename traits_type::char_type value_type;
|
||||
typedef Allocator allocator_type;
|
||||
@@ -290,7 +290,7 @@ bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>&
|
||||
template<class charT, class traits, class Allocator>
|
||||
bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
template<class charT, class traits, class Allocator>
|
||||
template<class charT, class traits, class Allocator>
|
||||
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
const basic_string<charT, traits, Allocator>& rhs);
|
||||
|
||||
@@ -353,7 +353,7 @@ basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>& os, const basic_string<charT, traits, Allocator>& str);
|
||||
|
||||
template<class charT, class traits, class Allocator>
|
||||
basic_istream<charT, traits>&
|
||||
basic_istream<charT, traits>&
|
||||
getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str,
|
||||
charT delim);
|
||||
|
||||
@@ -479,7 +479,7 @@ bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
|
||||
// char_traits
|
||||
|
||||
template <class _CharT>
|
||||
struct _LIBCPP_VISIBLE char_traits
|
||||
struct char_traits
|
||||
{
|
||||
typedef _CharT char_type;
|
||||
typedef int int_type;
|
||||
@@ -591,7 +591,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
|
||||
// char_traits<char>
|
||||
|
||||
template <>
|
||||
struct _LIBCPP_VISIBLE char_traits<char>
|
||||
struct char_traits<char>
|
||||
{
|
||||
typedef char char_type;
|
||||
typedef int int_type;
|
||||
@@ -876,7 +876,7 @@ char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
// basic_string
|
||||
|
||||
@@ -932,8 +932,8 @@ __basic_string_common<__b>::__throw_out_of_range() const
|
||||
|
||||
extern template class __basic_string_common<true>;
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
class _LIBCPP_VISIBLE basic_string
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
class basic_string
|
||||
: private __basic_string_common<true>
|
||||
{
|
||||
public:
|
||||
@@ -956,10 +956,10 @@ public:
|
||||
#elif defined(_LIBCPP_RAW_ITERATORS)
|
||||
typedef pointer iterator;
|
||||
typedef const_pointer const_iterator;
|
||||
#else // defined(_LIBCPP_RAW_ITERATORS)
|
||||
#else
|
||||
typedef __wrap_iter<pointer> iterator;
|
||||
typedef __wrap_iter<const_pointer> const_iterator;
|
||||
#endif // defined(_LIBCPP_RAW_ITERATORS)
|
||||
#endif
|
||||
typedef _STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef _STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
@@ -974,10 +974,10 @@ private:
|
||||
#if _LIBCPP_BIG_ENDIAN
|
||||
enum {__short_mask = 0x80};
|
||||
enum {__long_mask = ~(size_type(~0) >> 1)};
|
||||
#else // _LIBCPP_BIG_ENDIAN
|
||||
#else
|
||||
enum {__short_mask = 0x01};
|
||||
enum {__long_mask = 0x1};
|
||||
#endif // _LIBCPP_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
enum {__mask = size_type(~0) >> 1};
|
||||
|
||||
@@ -1031,10 +1031,10 @@ public:
|
||||
explicit basic_string(const allocator_type& __a);
|
||||
basic_string(const basic_string& __str);
|
||||
basic_string(const basic_string& __str, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
basic_string(basic_string&& __str);
|
||||
basic_string(basic_string&& __str, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
basic_string(const_pointer __s);
|
||||
basic_string(const_pointer __s, const allocator_type& __a);
|
||||
basic_string(const_pointer __s, size_type __n);
|
||||
@@ -1053,7 +1053,7 @@ public:
|
||||
~basic_string();
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const basic_string& __str) {return assign(__str);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(basic_string&& __str) {swap(__str); return *this;}
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);}
|
||||
@@ -1259,6 +1259,8 @@ private:
|
||||
_LIBCPP_INLINE_VISIBILITY const allocator_type& __alloc() const {return __r_.second();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY bool __is_long() const {return bool(__r_.first().__s.__size_ & __short_mask);}
|
||||
_LIBCPP_INLINE_VISIBILITY void __set_long() {__r_.first().__s.__size_ &= __short_mask;}
|
||||
_LIBCPP_INLINE_VISIBILITY void __set_short() {__r_.first().__s.__size_ |= ~__short_mask;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void __set_short_size(size_type __s)
|
||||
#if _LIBCPP_BIG_ENDIAN
|
||||
@@ -1307,7 +1309,7 @@ private:
|
||||
void __init(const_pointer __s, size_type __sz, size_type __reserve);
|
||||
void __init(const_pointer __s, size_type __sz);
|
||||
void __init(size_type __n, value_type __c);
|
||||
|
||||
|
||||
template <class _InputIterator>
|
||||
typename enable_if
|
||||
<
|
||||
@@ -1326,7 +1328,7 @@ private:
|
||||
__init(_ForwardIterator __first, _ForwardIterator __last);
|
||||
|
||||
void __grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
|
||||
size_type __n_copy, size_type __n_del, size_type __n_add = 0);
|
||||
size_type __n_copy, size_type __n_del, size_type __n_add = 0);
|
||||
void __grow_by_and_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
|
||||
size_type __n_copy, size_type __n_del,
|
||||
size_type __n_add, const_pointer __p_new_stuff);
|
||||
@@ -1353,7 +1355,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_all_iterators()
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
iterator::__remove_all(this);
|
||||
const_iterator::__remove_all(this);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
@@ -1393,7 +1395,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type
|
||||
__p = __p->__next;
|
||||
}
|
||||
}
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
@@ -1521,7 +1523,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
|
||||
__init(__str.__get_long_pointer(), __str.__get_long_size());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1545,7 +1547,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
void
|
||||
@@ -1586,6 +1588,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_typ
|
||||
__init(__n, __c);
|
||||
}
|
||||
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos, size_type __n,
|
||||
const allocator_type& __a)
|
||||
@@ -1611,7 +1614,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __first != __last; ++__first)
|
||||
push_back(*__first);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -1622,7 +1625,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
|
||||
__alloc().deallocate(__get_long_pointer(), __get_long_cap());
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
@@ -2544,7 +2547,7 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__new_data = __alloc().allocate(__res_arg+1);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
@@ -2552,10 +2555,10 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#else // _LIBCPP_NO_EXCEPTIONS
|
||||
#else
|
||||
if (__new_data == 0)
|
||||
return;
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
__now_long = true;
|
||||
__was_long = __is_long();
|
||||
@@ -2689,7 +2692,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
__invalidate_all_iterators();
|
||||
__str.__invalidate_all_iterators();
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
// find
|
||||
@@ -3179,7 +3182,7 @@ operator==(const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __lhs,
|
||||
|
||||
// operator!=
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
bool
|
||||
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
||||
@@ -3423,7 +3426,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -3483,7 +3486,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
|
||||
return _STD::move(__lhs);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
// swap
|
||||
|
||||
@@ -3504,7 +3507,7 @@ struct __is_zero_default_constructible<basic_string<_CharT, _Traits, _Allocator>
|
||||
typedef basic_string<char16_t> u16string;
|
||||
typedef basic_string<char32_t> u32string;
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
int stoi (const string& __str, size_t* __idx = 0, int __base = 10);
|
||||
long stol (const string& __str, size_t* __idx = 0, int __base = 10);
|
||||
|
@@ -149,10 +149,10 @@ public:
|
||||
strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = 0);
|
||||
strstreambuf(const unsigned char* __gnext, streamsize __n);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
strstreambuf(strstreambuf&& __rhs);
|
||||
strstreambuf& operator=(strstreambuf&& __rhs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
virtual ~strstreambuf();
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
istrstream(char* __s, streamsize __n)
|
||||
: istream(&__sb_), __sb_(__s, __n) {}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
istrstream(istrstream&& __rhs)
|
||||
: istream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
virtual ~istrstream();
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
__sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
ostrstream(ostrstream&& __rhs)
|
||||
: ostream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
virtual ~ostrstream();
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
__sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
strstream(strstream&& __rhs)
|
||||
: iostream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
virtual ~strstream();
|
||||
|
||||
|
@@ -237,9 +237,6 @@ template <class _Tp> struct is_error_code_enum
|
||||
template <class _Tp> struct is_error_condition_enum
|
||||
: public false_type {};
|
||||
|
||||
// Some error codes are not present on all platforms, so we provide equivalents
|
||||
// for them:
|
||||
|
||||
//enum class errc
|
||||
struct errc
|
||||
{
|
||||
@@ -284,30 +281,18 @@ enum _ {
|
||||
no_child_process = ECHILD,
|
||||
no_link = ENOLINK,
|
||||
no_lock_available = ENOLCK,
|
||||
#ifdef ENODATA
|
||||
no_message_available = ENODATA,
|
||||
#else
|
||||
no_message_available = ENOMSG,
|
||||
#endif
|
||||
no_message = ENOMSG,
|
||||
no_protocol_option = ENOPROTOOPT,
|
||||
no_space_on_device = ENOSPC,
|
||||
#ifdef ENOSR
|
||||
no_stream_resources = ENOSR,
|
||||
#else
|
||||
no_stream_resources = ENOMEM,
|
||||
#endif
|
||||
no_such_device_or_address = ENXIO,
|
||||
no_such_device = ENODEV,
|
||||
no_such_file_or_directory = ENOENT,
|
||||
no_such_process = ESRCH,
|
||||
not_a_directory = ENOTDIR,
|
||||
not_a_socket = ENOTSOCK,
|
||||
#ifdef ENOSTR
|
||||
not_a_stream = ENOSTR,
|
||||
#else
|
||||
not_a_stream = EINVAL,
|
||||
#endif
|
||||
not_connected = ENOTCONN,
|
||||
not_enough_memory = ENOMEM,
|
||||
not_supported = ENOTSUP,
|
||||
@@ -325,11 +310,7 @@ enum _ {
|
||||
resource_unavailable_try_again = EAGAIN,
|
||||
result_out_of_range = ERANGE,
|
||||
state_not_recoverable = ENOTRECOVERABLE,
|
||||
#ifdef ETIME
|
||||
stream_timeout = ETIME,
|
||||
#else
|
||||
stream_timeout = ETIMEDOUT,
|
||||
#endif
|
||||
text_file_busy = ETXTBSY,
|
||||
timed_out = ETIMEDOUT,
|
||||
too_many_files_open_in_system = ENFILE,
|
||||
|
115
include/thread
115
include/thread
@@ -15,7 +15,7 @@
|
||||
|
||||
thread synopsis
|
||||
|
||||
#define __STDCPP_THREADS__ __cplusplus
|
||||
#define __STDCPP_THREADS __cplusplus
|
||||
|
||||
namespace std
|
||||
{
|
||||
@@ -99,72 +99,10 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#define __STDCPP_THREADS__ __cplusplus
|
||||
#define __STDCPP_THREADS __cplusplus
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp>
|
||||
class __thread_specific_ptr
|
||||
{
|
||||
pthread_key_t __key_;
|
||||
|
||||
__thread_specific_ptr(const __thread_specific_ptr&);
|
||||
__thread_specific_ptr& operator=(const __thread_specific_ptr&);
|
||||
|
||||
static void __at_thread_exit(void*);
|
||||
public:
|
||||
typedef _Tp* pointer;
|
||||
|
||||
__thread_specific_ptr();
|
||||
~__thread_specific_ptr();
|
||||
|
||||
pointer get() const {return static_cast<_Tp*>(pthread_getspecific(__key_));}
|
||||
pointer operator*() const {return *get();}
|
||||
pointer operator->() const {return get();}
|
||||
pointer release();
|
||||
void reset(pointer __p = nullptr);
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::__at_thread_exit(void* __p)
|
||||
{
|
||||
delete static_cast<pointer>(__p);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::__thread_specific_ptr()
|
||||
{
|
||||
int __ec = pthread_key_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
|
||||
if (__ec)
|
||||
throw system_error(error_code(__ec, system_category()),
|
||||
"__thread_specific_ptr construction failed");
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::~__thread_specific_ptr()
|
||||
{
|
||||
pthread_key_delete(__key_);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
typename __thread_specific_ptr<_Tp>::pointer
|
||||
__thread_specific_ptr<_Tp>::release()
|
||||
{
|
||||
pointer __p = get();
|
||||
pthread_setspecific(__key_, 0);
|
||||
return __p;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::reset(pointer __p)
|
||||
{
|
||||
pointer __p_old = get();
|
||||
pthread_setspecific(__key_, __p);
|
||||
delete __p_old;
|
||||
}
|
||||
|
||||
class thread;
|
||||
class __thread_id;
|
||||
|
||||
@@ -240,13 +178,10 @@ class thread
|
||||
{
|
||||
pthread_t __t_;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
thread(const thread&) = delete;
|
||||
thread& operator=(const thread&) = delete;
|
||||
#else // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
thread(const thread&);
|
||||
thread& operator=(const thread&);
|
||||
#endif // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#ifndef _LIBCPP_MOVE
|
||||
thread(const thread&); // = delete;
|
||||
thread& operator=(const thread&); // = delete;
|
||||
#endif
|
||||
public:
|
||||
typedef __thread_id id;
|
||||
typedef pthread_t native_handle_type;
|
||||
@@ -260,15 +195,17 @@ public:
|
||||
>::type
|
||||
>
|
||||
explicit thread(_F&& __f, _Args&&... __args);
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
template <class _F> explicit thread(_F __f);
|
||||
#endif
|
||||
~thread();
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
thread(const thread&) = delete;
|
||||
thread(thread&& __t) : __t_(__t.__t_) {__t.__t_ = 0;}
|
||||
thread& operator=(const thread&) = delete;
|
||||
thread& operator=(thread&& __t);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void swap(thread& __t) {_STD::swap(__t_, __t.__t_);}
|
||||
|
||||
@@ -281,31 +218,10 @@ public:
|
||||
static unsigned hardware_concurrency();
|
||||
};
|
||||
|
||||
class __assoc_sub_state;
|
||||
|
||||
class __thread_struct_imp;
|
||||
|
||||
class __thread_struct
|
||||
{
|
||||
__thread_struct_imp* __p_;
|
||||
|
||||
__thread_struct(const __thread_struct&);
|
||||
__thread_struct& operator=(const __thread_struct&);
|
||||
public:
|
||||
__thread_struct();
|
||||
~__thread_struct();
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable*, mutex*);
|
||||
void __make_ready_at_thread_exit(__assoc_sub_state*);
|
||||
};
|
||||
|
||||
extern __thread_specific_ptr<__thread_struct> __thread_local_data;
|
||||
|
||||
template <class _F>
|
||||
void*
|
||||
__thread_proxy(void* __vp)
|
||||
{
|
||||
__thread_local_data.reset(new __thread_struct);
|
||||
std::unique_ptr<_F> __p(static_cast<_F*>(__vp));
|
||||
(*__p)();
|
||||
return nullptr;
|
||||
@@ -328,7 +244,7 @@ thread::thread(_F&& __f, _Args&&... __args)
|
||||
__throw_system_error(__ec, "thread constructor failed");
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
template <class _F>
|
||||
thread::thread(_F __f)
|
||||
@@ -341,9 +257,9 @@ thread::thread(_F __f)
|
||||
__throw_system_error(__ec, "thread constructor failed");
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
inline
|
||||
thread&
|
||||
@@ -356,11 +272,12 @@ thread::operator=(thread&& __t)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
inline
|
||||
void swap(thread& __x, thread& __y) {__x.swap(__y);}
|
||||
|
||||
|
||||
namespace this_thread
|
||||
{
|
||||
|
||||
|
@@ -72,7 +72,6 @@ public:
|
||||
const unspecified ignore;
|
||||
|
||||
template <class... T> tuple<V...> make_tuple(T&&...);
|
||||
template <class... T> tuple<ATypes...> forward_as_tuple(T&&...);
|
||||
template <class... T> tuple<T&...> tie(T&...);
|
||||
template <class... T, class... U> tuple<T..., U...> tuple_cat(const tuple<T...>&, const tuple<U...>&);
|
||||
template <class... T, class... U> tuple<T..., U...> tuple_cat(tuple<T...>&&, const tuple<U...>&);
|
||||
@@ -103,6 +102,12 @@ template <class... Types, class Alloc>
|
||||
template <class... Types>
|
||||
void swap(tuple<Types...>& x, tuple<Types...>& y);
|
||||
|
||||
template <class InputIterator>
|
||||
InputIterator begin(const std::tuple<InputIterator, InputIterator>& t);
|
||||
|
||||
template <class InputIterator>
|
||||
InputIterator end(const std::tuple<InputIterator, InputIterator>& t);
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
@@ -392,7 +397,7 @@ struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
|
||||
>
|
||||
__tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
|
||||
: __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, typename tuple_element<_Indx,
|
||||
typename __make_tuple_types<_Tuple>::type>::type>(), __a,
|
||||
typename __make_tuple_types<_Tuple>::type>::type>(), __a,
|
||||
_STD::forward<typename tuple_element<_Indx,
|
||||
typename __make_tuple_types<_Tuple>::type>::type>(_STD::get<_Indx>(__t)))...
|
||||
{}
|
||||
@@ -616,14 +621,6 @@ make_tuple(_Tp&&... __t)
|
||||
return tuple<typename __make_tuple_return<_Tp>::type...>(_STD::forward<_Tp>(__t)...);
|
||||
}
|
||||
|
||||
template <class... _Tp>
|
||||
inline
|
||||
tuple<_Tp&&...>
|
||||
forward_as_tuple(_Tp&&... __t)
|
||||
{
|
||||
return tuple<_Tp&&...>(_STD::forward<_Tp>(__t)...);
|
||||
}
|
||||
|
||||
template <size_t _I>
|
||||
struct __tuple_equal
|
||||
{
|
||||
@@ -787,6 +784,22 @@ template <class ..._Tp, class _Alloc>
|
||||
struct uses_allocator<tuple<_Tp...>, _Alloc>
|
||||
: true_type {};
|
||||
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
_InputIterator
|
||||
begin(const std::tuple<_InputIterator, _InputIterator>& __t)
|
||||
{
|
||||
return get<0>(__t);
|
||||
}
|
||||
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
_InputIterator
|
||||
end(const std::tuple<_InputIterator, _InputIterator>& __t)
|
||||
{
|
||||
return get<1>(__t);
|
||||
}
|
||||
|
||||
template <class _T1, class _T2>
|
||||
template <class... _Args1, class... _Args2, size_t ..._I1, size_t ..._I2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -798,7 +811,7 @@ pair<_T1, _T2>::pair(piecewise_construct_t,
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -34,13 +34,14 @@ namespace std
|
||||
template <class T> struct is_pointer;
|
||||
template <class T> struct is_lvalue_reference;
|
||||
template <class T> struct is_rvalue_reference;
|
||||
template <class T> struct is_reference;
|
||||
template <class T> struct is_member_object_pointer;
|
||||
template <class T> struct is_member_function_pointer;
|
||||
template <class T> struct is_enum;
|
||||
template <class T> struct is_union;
|
||||
template <class T> struct is_class;
|
||||
template <class T> struct is_function;
|
||||
|
||||
|
||||
// Secondary classification traits:
|
||||
template <class T> struct is_reference;
|
||||
template <class T> struct is_arithmetic;
|
||||
@@ -49,7 +50,7 @@ namespace std
|
||||
template <class T> struct is_scalar;
|
||||
template <class T> struct is_object;
|
||||
template <class T> struct is_compound;
|
||||
|
||||
|
||||
// Const-volatile properties and transformations:
|
||||
template <class T> struct is_const;
|
||||
template <class T> struct is_volatile;
|
||||
@@ -59,28 +60,28 @@ namespace std
|
||||
template <class T> struct add_const;
|
||||
template <class T> struct add_volatile;
|
||||
template <class T> struct add_cv;
|
||||
|
||||
|
||||
// Reference transformations:
|
||||
template <class T> struct remove_reference;
|
||||
template <class T> struct add_lvalue_reference;
|
||||
template <class T> struct add_rvalue_reference;
|
||||
|
||||
|
||||
// Pointer transformations:
|
||||
template <class T> struct remove_pointer;
|
||||
template <class T> struct add_pointer;
|
||||
|
||||
|
||||
// Integral properties:
|
||||
template <class T> struct is_signed;
|
||||
template <class T> struct is_unsigned;
|
||||
template <class T> struct make_signed;
|
||||
template <class T> struct make_unsigned;
|
||||
|
||||
|
||||
// Array properties and transformations:
|
||||
template <class T> struct rank;
|
||||
template <class T, unsigned I = 0> struct extent;
|
||||
template <class T> struct remove_extent;
|
||||
template <class T> struct remove_all_extents;
|
||||
|
||||
|
||||
// Member introspection:
|
||||
template <class T> struct is_pod;
|
||||
template <class T> struct is_trivial;
|
||||
@@ -90,38 +91,33 @@ namespace std
|
||||
template <class T> struct is_empty;
|
||||
template <class T> struct is_polymorphic;
|
||||
template <class T> struct is_abstract;
|
||||
|
||||
template <class T, class... Args> struct is_constructible;
|
||||
template <class T, class... Args> struct is_nothrow_constructible;
|
||||
|
||||
template <class T> struct has_trivial_default_constructor
|
||||
template <class T> struct has_nothrow_default_constructor;
|
||||
template <class T> struct has_default_constructor;
|
||||
|
||||
template <class T> struct has_trivial_copy_constructor;
|
||||
template <class T> struct has_nothrow_copy_constructor;
|
||||
template <class T> struct has_copy_constructor;
|
||||
|
||||
template <class T> struct has_trivial_move_constructor;
|
||||
template <class T> struct has_nothrow_move_constructor;
|
||||
template <class T> struct has_move_constructor;
|
||||
|
||||
template <class T> struct has_trivial_copy_assign;
|
||||
template <class T> struct has_nothrow_copy_assign;
|
||||
template <class T> struct has_copy_assign;
|
||||
|
||||
template <class T> struct has_trivial_move_assign;
|
||||
template <class T> struct has_nothrow_move_assign;
|
||||
template <class T> struct has_move_assign;
|
||||
|
||||
template <class T> struct has_trivial_default_constructor
|
||||
template <class T> struct has_trivial_copy_constructor;
|
||||
template <class T> struct has_trivial_move_constructor;
|
||||
template <class T> struct has_trivial_copy_assign;
|
||||
template <class T> struct has_trivial_move_assign;
|
||||
template <class T> struct has_trivial_destructor;
|
||||
template <class T> struct has_nothrow_default_constructor;
|
||||
template <class T> struct has_nothrow_copy_constructor;
|
||||
template <class T> struct has_nothrow_move_constructor;
|
||||
template <class T> struct has_nothrow_copy_assign;
|
||||
template <class T> struct has_nothrow_move_assign;
|
||||
template <class T> struct has_virtual_destructor;
|
||||
|
||||
|
||||
// Relationships between types:
|
||||
template <class T, class U> struct is_same;
|
||||
template <class Base, class Derived> struct is_base_of;
|
||||
template <class From, class To> struct is_convertible;
|
||||
|
||||
template <class From, class To> struct is_explicitly_convertible;
|
||||
template <class T> struct underlying_type;
|
||||
|
||||
// Alignment properties and transformations:
|
||||
template <class T> struct alignment_of;
|
||||
template <size_t Len, size_t Align = most_stringent_alignment_requirement>
|
||||
@@ -157,12 +153,9 @@ struct __two {char _[2];};
|
||||
template <class _Tp, _Tp __v>
|
||||
struct integral_constant
|
||||
{
|
||||
static constexpr _Tp value = __v;
|
||||
static const _Tp value = __v;
|
||||
typedef _Tp value_type;
|
||||
typedef integral_constant type;
|
||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
constexpr operator value_type() {return value;}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _Tp, _Tp __v>
|
||||
@@ -214,7 +207,7 @@ template <> struct __is_integral<wchar_t> : public true_type
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
template <> struct __is_integral<char16_t> : public true_type {};
|
||||
template <> struct __is_integral<char32_t> : public true_type {};
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
template <> struct __is_integral<short> : public true_type {};
|
||||
template <> struct __is_integral<unsigned short> : public true_type {};
|
||||
template <> struct __is_integral<int> : public true_type {};
|
||||
@@ -254,43 +247,31 @@ template <class _Tp> struct is_lvalue_reference : public false_type {};
|
||||
template <class _Tp> struct is_lvalue_reference<_Tp&> : public true_type {};
|
||||
|
||||
template <class _Tp> struct is_rvalue_reference : public false_type {};
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> struct is_rvalue_reference<_Tp&&> : public true_type {};
|
||||
#endif
|
||||
|
||||
template <class _Tp> struct is_reference : public false_type {};
|
||||
template <class _Tp> struct is_reference<_Tp&> : public true_type {};
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> struct is_reference<_Tp&&> : public true_type {};
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_TYPE_TRAITS
|
||||
#endif
|
||||
|
||||
// is_union
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
|
||||
template <class _Tp> struct is_union
|
||||
: public integral_constant<bool, __is_union(_Tp)> {};
|
||||
template <class _Tp> struct is_union : public integral_constant<bool, __is_union(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
#else
|
||||
|
||||
template <class _Tp> struct __libcpp_union : public false_type {};
|
||||
template <class _Tp> struct is_union : public __libcpp_union<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
#endif
|
||||
|
||||
// is_class
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_class
|
||||
: public integral_constant<bool, __is_class(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
namespace __is_class_imp
|
||||
{
|
||||
template <class _Tp> char __test(int _Tp::*);
|
||||
@@ -300,8 +281,6 @@ template <class _Tp> __two __test(...);
|
||||
template <class _Tp> struct is_class
|
||||
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_function
|
||||
|
||||
namespace __is_function_imp
|
||||
@@ -346,13 +325,6 @@ template <class _Tp> struct is_member_object_pointer
|
||||
|
||||
// is_enum
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_enum
|
||||
: public integral_constant<bool, __is_enum(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_enum
|
||||
: public integral_constant<bool, !is_void<_Tp>::value &&
|
||||
!is_integral<_Tp>::value &&
|
||||
@@ -365,8 +337,6 @@ template <class _Tp> struct is_enum
|
||||
!is_class<_Tp>::value &&
|
||||
!is_function<_Tp>::value > {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_arithmetic
|
||||
|
||||
template <class _Tp> struct is_arithmetic
|
||||
@@ -431,7 +401,7 @@ template <class _Tp> struct add_cv {typedef typename add_const<typename add_vola
|
||||
|
||||
template <class _Tp> struct remove_reference {typedef _Tp type;};
|
||||
template <class _Tp> struct remove_reference<_Tp&> {typedef _Tp type;};
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> struct remove_reference<_Tp&&> {typedef _Tp type;};
|
||||
#endif
|
||||
|
||||
@@ -444,7 +414,7 @@ template <> struct add_lvalue_reference<const void> {typedef c
|
||||
template <> struct add_lvalue_reference<volatile void> {typedef volatile void type;};
|
||||
template <> struct add_lvalue_reference<const volatile void> {typedef const volatile void type;};
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp> struct add_rvalue_reference {typedef _Tp&& type;};
|
||||
template <> struct add_rvalue_reference<void> {typedef void type;};
|
||||
@@ -452,26 +422,7 @@ template <> struct add_rvalue_reference<const void> {typedef c
|
||||
template <> struct add_rvalue_reference<volatile void> {typedef volatile void type;};
|
||||
template <> struct add_rvalue_reference<const volatile void> {typedef const volatile void type;};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
typename add_rvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct __any
|
||||
{
|
||||
__any(...);
|
||||
};
|
||||
#endif
|
||||
|
||||
// remove_pointer
|
||||
|
||||
@@ -565,13 +516,13 @@ template <class _Tp> struct is_abstract : public __libcpp_abstract<_Tp> {};
|
||||
|
||||
namespace __is_convertible_imp
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&);
|
||||
#else
|
||||
template <class _Tp> char __test(_Tp);
|
||||
#endif
|
||||
template <class _Tp> __two __test(...);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> _Tp&& __source();
|
||||
#else
|
||||
template <class _Tp> typename remove_reference<_Tp>::type& __source();
|
||||
@@ -611,12 +562,12 @@ struct __is_convertible
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 0> : false_type {};
|
||||
|
||||
template <class _T1> struct __is_convertible<_T1, const _T1&, 1, 0> : true_type {};
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _T1> struct __is_convertible<_T1, _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, const _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, volatile _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, const volatile _T1&&, 1, 0> : true_type {};
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2*, 1, 0>
|
||||
: public integral_constant<bool, __is_convertible<typename remove_all_extents<_T1>::type*, _T2*>::value> {};
|
||||
@@ -630,8 +581,9 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2* volatile, 1, 0
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2* const volatile, 1, 0>
|
||||
: public integral_constant<bool, __is_convertible<typename remove_all_extents<_T1>::type*, _T2*const volatile>::value> {};
|
||||
|
||||
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 0> : public false_type {};
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _T1> struct __is_convertible<_T1, _T1&&, 2, 0> : public true_type {};
|
||||
#endif
|
||||
template <class _T1> struct __is_convertible<_T1, _T1*, 2, 0> : public true_type {};
|
||||
@@ -746,144 +698,66 @@ template <class _Tp> struct is_polymorphic : public __libcpp_polymorphic<_Tp> {}
|
||||
|
||||
// has_trivial_default_constructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_default_constructor
|
||||
: public integral_constant<bool, __has_trivial_constructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct __has_trivial_default_constructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value> {};
|
||||
template <class _Tp> struct __has_trivial_default_constructor : public integral_constant<bool, is_scalar<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_default_constructor
|
||||
: public __has_trivial_default_constructor<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_nothrow_default_constructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_default_constructor
|
||||
: public integral_constant<bool, __has_nothrow_constructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_default_constructor
|
||||
: public has_trivial_default_constructor<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
template <class _Tp> struct has_nothrow_default_constructor : public has_trivial_default_constructor<_Tp> {};
|
||||
|
||||
// has_trivial_copy_constructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
template <class _Tp> struct __has_trivial_copy_constructor : public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_constructor
|
||||
: public integral_constant<bool, __has_trivial_copy(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_constructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
: public __has_trivial_copy_constructor<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
// has_nothrow_copy_constructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_constructor
|
||||
: public integral_constant<bool, __has_nothrow_copy(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_constructor
|
||||
: public has_trivial_copy_constructor<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
template <class _Tp> struct has_nothrow_copy_constructor : public has_trivial_copy_constructor<_Tp> {};
|
||||
|
||||
// has_nothrow_move_constructor
|
||||
|
||||
template <class _Tp> struct has_nothrow_move_constructor : public has_nothrow_copy_constructor<_Tp> {};
|
||||
|
||||
// has_copy_constructor
|
||||
|
||||
template <class _Tp> struct has_copy_constructor : public true_type {};
|
||||
|
||||
// has_trivial_copy_assign
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
template <class _Tp> struct __libcpp_trivial_copy_assign : public integral_constant<bool, !is_const<_Tp>::value &&
|
||||
is_scalar<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_assign
|
||||
: public integral_constant<bool, __has_trivial_assign(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_assign
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value &&
|
||||
!is_const<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
: public __libcpp_trivial_copy_assign<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
// has_nothrow_copy_assign
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_assign
|
||||
: public integral_constant<bool, __has_nothrow_assign(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_assign
|
||||
: public has_trivial_copy_assign<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
template <class _Tp> struct has_nothrow_copy_assign: public has_trivial_copy_assign<_Tp> {};
|
||||
|
||||
// has_trivial_destructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_destructor
|
||||
: public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct __libcpp_trivial_destructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
template <class _Tp> struct __libcpp_trivial_destructor : public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_destructor
|
||||
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_virtual_destructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_virtual_destructor
|
||||
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_virtual_destructor : public false_type {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_pod
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_pod
|
||||
: public integral_constant<bool, __is_pod(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_pod : public integral_constant<bool, has_trivial_default_constructor<_Tp>::value &&
|
||||
has_trivial_copy_constructor<_Tp>::value &&
|
||||
has_trivial_copy_assign<_Tp>::value &&
|
||||
has_trivial_destructor<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// alignment_of
|
||||
|
||||
template <class _Tp> struct __alignment_of {_Tp _;};
|
||||
@@ -1015,6 +889,7 @@ template <class _A1, class _A2 = void, class _A3 = void,
|
||||
(is_arithmetic<_A3>::value || is_void<_A3>::value)>
|
||||
class __promote {};
|
||||
|
||||
|
||||
template <class _A1, class _A2, class _A3>
|
||||
class __promote<_A1, _A2, _A3, true>
|
||||
{
|
||||
@@ -1200,6 +1075,7 @@ public:
|
||||
typedef typename common_type<typename common_type<_Tp, _Up>::type, V>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <class _Tp>
|
||||
struct common_type<_Tp, void, void>
|
||||
{
|
||||
@@ -1211,19 +1087,19 @@ template <class _Tp, class _Up>
|
||||
struct common_type<_Tp, _Up, void>
|
||||
{
|
||||
private:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
static _Tp&& __t();
|
||||
static _Up&& __u();
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
static _Tp __t();
|
||||
static _Up __u();
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
static bool __f();
|
||||
#endif
|
||||
public:
|
||||
typedef decltype(__f() ? __t() : __u()) type;
|
||||
typedef __typeof__(__f() ? __t() : __u()) type;
|
||||
};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
template <class ..._Tp> struct common_type;
|
||||
|
||||
@@ -1250,103 +1126,33 @@ struct common_type<_Tp, _Up, _Vp...>
|
||||
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
decltype((_STD::declval<_Tp>() = _STD::declval<_Arg>(), true_type()))
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__is_assignable_test(_Tp&&, _Arg&&);
|
||||
#else
|
||||
__is_assignable_test(_Tp&, _Arg&);
|
||||
#endif
|
||||
|
||||
template <class _Arg>
|
||||
false_type
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__is_assignable_test(__any, _Arg&&);
|
||||
#else
|
||||
__is_assignable_test(__any, _Arg&);
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
struct __is_assignable_imp
|
||||
: public common_type
|
||||
<
|
||||
decltype(__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
|
||||
>::type {};
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
struct __is_assignable
|
||||
: public __is_assignable_imp<_Tp, _Arg> {};
|
||||
|
||||
// has_copy_assign
|
||||
|
||||
template <class _Tp> struct has_copy_assign
|
||||
: public __is_assignable<_Tp&, const _Tp&> {};
|
||||
|
||||
template <class _Tp> struct has_copy_assign<_Tp[]>
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp> struct has_copy_assign<_Tp&>
|
||||
: public false_type {};
|
||||
|
||||
// move
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename remove_reference<_Tp>::type&&
|
||||
move(_Tp&& __t)
|
||||
{
|
||||
return static_cast<typename remove_reference<_Tp>::type&&>(__t);
|
||||
}
|
||||
move(_Tp&& __t) {return __t;}
|
||||
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
!is_lvalue_reference<_Tp>::value
|
||||
>::type
|
||||
>
|
||||
template <class _Tp, class _Up,
|
||||
class = typename _STD::enable_if<
|
||||
is_lvalue_reference<_Tp>::value ? is_lvalue_reference<_Up>::value : true
|
||||
>::type,
|
||||
class = typename _STD::enable_if<
|
||||
is_convertible<typename remove_reference<_Up>::type*,
|
||||
typename remove_reference<_Tp>::type*>::value>::type>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp&&
|
||||
forward(typename common_type<_Tp>::type& __t)
|
||||
forward(_Up&& __t)
|
||||
{
|
||||
return static_cast<_Tp&&>(__t);
|
||||
return __t; // to quiet spurious warning
|
||||
// return static_cast<_Tp&&>(__t);
|
||||
}
|
||||
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
!is_lvalue_reference<_Tp>::value
|
||||
>::type
|
||||
>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp&&
|
||||
forward(typename common_type<_Tp>::type&& __t)
|
||||
{
|
||||
return static_cast<_Tp&&>(__t);
|
||||
}
|
||||
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
is_lvalue_reference<_Tp>::value
|
||||
>::type
|
||||
>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp
|
||||
forward(typename common_type<_Tp>::type __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
is_lvalue_reference<_Tp>::value
|
||||
>::type
|
||||
>
|
||||
_Tp
|
||||
forward(typename remove_reference<_Tp>::type&& __t) = delete;
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else // _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
class __rv
|
||||
@@ -1430,7 +1236,21 @@ forward(const _Up& __t)
|
||||
return _Tp(__rv<_Tp>(__t));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
typename add_rvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#else
|
||||
|
||||
template <class _Tp>
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
struct decay
|
||||
@@ -1469,71 +1289,6 @@ public:
|
||||
typedef decltype(declval<_Fn>()(declval<_ArgTypes>()...)) type;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
||||
template <class _MP, class _Tp, class ..._Args>
|
||||
struct __result_of_mp;
|
||||
|
||||
// member function pointer
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...), _Tp, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const, _Tp, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) volatile, _Tp, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const volatile, _Tp, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
// member data pointer
|
||||
|
||||
template <class _MP, class _Tp, bool>
|
||||
struct __result_of_mdp;
|
||||
|
||||
template <class _R, class _Class, class _Tp>
|
||||
struct __result_of_mdp<_R _Class::*, _Tp, false>
|
||||
{
|
||||
typedef typename __apply_cv<decltype(*_STD::declval<_Tp>()), _R>::type type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp>
|
||||
struct __result_of_mdp<_R _Class::*, _Tp, true>
|
||||
{
|
||||
typedef typename __apply_cv<_Tp, _R>::type&& type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp>
|
||||
struct __result_of_mp<_R _Class::*, _Tp>
|
||||
: public __result_of_mdp<_R _Class::*, _Tp,
|
||||
is_base_of<_Class, typename remove_reference<_Tp>::type>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Fn, class _Tp, class ..._ArgTypes>
|
||||
class __result_of<_Fn(_Tp, _ArgTypes...), false> // _Fn must be member pointer
|
||||
: public __result_of_mp<_Fn, _Tp, _ArgTypes...>
|
||||
{
|
||||
};
|
||||
|
||||
#endif // 0
|
||||
|
||||
// result_of
|
||||
|
||||
template <class _Fn, class ..._ArgTypes>
|
||||
class result_of<_Fn(_ArgTypes...)>
|
||||
: public __result_of<_Fn(_ArgTypes...),
|
||||
@@ -1546,7 +1301,7 @@ class result_of<_Fn(_ArgTypes...)>
|
||||
{
|
||||
};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else
|
||||
|
||||
template <class _Fn>
|
||||
class __result_of<_Fn(), true>
|
||||
@@ -1624,7 +1379,7 @@ class result_of<_Fn(_A0, _A1, _A2)>
|
||||
{
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
@@ -1636,6 +1391,11 @@ template <class _Tp, class ..._Args>
|
||||
decltype(_STD::move(_Tp(_STD::declval<_Args>()...)), true_type())
|
||||
__is_constructible_test(_Tp&&, _Args&& ...);
|
||||
|
||||
struct __any
|
||||
{
|
||||
__any(...);
|
||||
};
|
||||
|
||||
template <class ..._Args>
|
||||
false_type
|
||||
__is_constructible_test(__any, _Args&& ...);
|
||||
@@ -1660,7 +1420,7 @@ struct __is_constructible<false, _R(_A1...), _A2...>
|
||||
// Scalars are default constructible, references are not
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_constructible<true, _Tp>
|
||||
struct __is_constructible<true, _Tp>
|
||||
: public is_scalar<_Tp>
|
||||
{};
|
||||
|
||||
@@ -1675,7 +1435,7 @@ struct __is_constructible_ref
|
||||
};
|
||||
|
||||
template <class _Tp, class _A0>
|
||||
struct __is_constructible<true, _Tp, _A0>
|
||||
struct __is_constructible<true, _Tp, _A0>
|
||||
: public common_type
|
||||
<
|
||||
decltype(__is_constructible_ref<_Tp>::__(declval<_A0>()))
|
||||
@@ -1685,7 +1445,7 @@ struct __is_constructible<true, _Tp, _A0>
|
||||
// Scalars and references are not constructible from multiple args.
|
||||
|
||||
template <class _Tp, class _A0, class ..._Args>
|
||||
struct __is_constructible<true, _Tp, _A0, _Args...>
|
||||
struct __is_constructible<true, _Tp, _A0, _Args...>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
@@ -1704,23 +1464,22 @@ struct __is_constructible_void_check<true, _Tp, _Args...>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
template <class ..._Args> struct __contains_void;
|
||||
template <class ..._Args> struct __constains_void;
|
||||
|
||||
template <> struct __contains_void<> : false_type {};
|
||||
template <> struct __constains_void<> : false_type {};
|
||||
|
||||
template <class _A0, class ..._Args>
|
||||
struct __contains_void<_A0, _Args...>
|
||||
struct __constains_void<_A0, _Args...>
|
||||
{
|
||||
static const bool value = is_void<_A0>::value ||
|
||||
__contains_void<_Args...>::value;
|
||||
__constains_void<_Args...>::value;
|
||||
};
|
||||
|
||||
// is_constructible entry point
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
struct is_constructible
|
||||
: public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value
|
||||
|| is_abstract<_Tp>::value,
|
||||
: public __is_constructible_void_check<__constains_void<_Tp, _Args...>::value,
|
||||
_Tp, _Args...>
|
||||
{};
|
||||
|
||||
@@ -1746,99 +1505,7 @@ struct __is_constructible<false, _A[], _Args...>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
template <class _Tp>
|
||||
struct has_default_constructor
|
||||
: public is_constructible<_Tp>
|
||||
{};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
// template <class T> struct is_constructible0;
|
||||
|
||||
// main is_constructible0 test
|
||||
|
||||
template <class _Tp>
|
||||
decltype((_STD::move(_Tp()), true_type()))
|
||||
__is_constructible0_test(_Tp&);
|
||||
|
||||
false_type
|
||||
__is_constructible0_test(__any);
|
||||
|
||||
template <bool, class _Tp>
|
||||
struct __is_constructible0_imp // false, _Tp is not a scalar
|
||||
: public common_type
|
||||
<
|
||||
decltype(__is_constructible0_test(declval<_Tp&>()))
|
||||
>::type
|
||||
{};
|
||||
|
||||
// handle scalars and reference types
|
||||
|
||||
// Scalars are default constructible, references are not
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_constructible0_imp<true, _Tp>
|
||||
: public is_scalar<_Tp>
|
||||
{};
|
||||
|
||||
// Treat scalars and reference types separately
|
||||
|
||||
template <bool, class _Tp>
|
||||
struct __is_constructible0_void_check
|
||||
: public __is_constructible0_imp<is_scalar<_Tp>::value || is_reference<_Tp>::value,
|
||||
_Tp>
|
||||
{};
|
||||
|
||||
// If any of T or Args is void, is_constructible should be false
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_constructible0_void_check<true, _Tp>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
// has_default_constructor entry point
|
||||
|
||||
template <class _Tp>
|
||||
struct has_default_constructor
|
||||
: public __is_constructible0_void_check<is_void<_Tp>::value
|
||||
|| is_abstract<_Tp>::value,
|
||||
_Tp>
|
||||
{};
|
||||
|
||||
// Array types are default constructible if their element type
|
||||
// is default constructible
|
||||
|
||||
template <class _A, size_t _N>
|
||||
struct __is_constructible0_imp<false, _A[_N]>
|
||||
: public has_default_constructor<typename remove_all_extents<_A>::type>
|
||||
{};
|
||||
|
||||
// Incomplete array types are not constructible
|
||||
|
||||
template <class _A>
|
||||
struct __is_constructible0_imp<false, _A[]>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
// has_copy_constructor
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
template <class _Tp>
|
||||
struct has_copy_constructor
|
||||
: public is_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
|
||||
{};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
template <class _Tp>
|
||||
struct has_copy_constructor
|
||||
: public has_nothrow_copy_constructor<_Tp>
|
||||
{};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#endif
|
||||
|
||||
template <class _Tp> struct __is_zero_default_constructible
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value || is_empty<_Tp>::value> {};
|
||||
|
@@ -21,14 +21,14 @@ class type_info
|
||||
{
|
||||
public:
|
||||
virtual ~type_info();
|
||||
|
||||
|
||||
bool operator==(const type_info& rhs) const;
|
||||
bool operator!=(const type_info& rhs) const;
|
||||
|
||||
|
||||
bool before(const type_info& rhs) const;
|
||||
size_t hash_code() const throw();
|
||||
const char* name() const;
|
||||
|
||||
|
||||
type_info(const type_info& rhs) = delete;
|
||||
type_info& operator=(const type_info& rhs) = delete;
|
||||
};
|
||||
@@ -63,10 +63,11 @@ public:
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
|
||||
namespace std // purposefully not using versioning namespace
|
||||
{
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI type_info
|
||||
class _LIBCPP_EXCEPTION_ABI type_info
|
||||
{
|
||||
type_info& operator=(const type_info&);
|
||||
type_info(const type_info&);
|
||||
@@ -94,7 +95,7 @@ public:
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI bad_cast
|
||||
: public exception
|
||||
: public exception
|
||||
{
|
||||
public:
|
||||
bad_cast() throw();
|
||||
@@ -103,7 +104,7 @@ public:
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI bad_typeid
|
||||
: public exception
|
||||
: public exception
|
||||
{
|
||||
public:
|
||||
bad_typeid() throw();
|
||||
@@ -111,6 +112,9 @@ public:
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
|
||||
} // std
|
||||
|
||||
|
||||
|
||||
#endif // __LIBCPP_TYPEINFO
|
||||
|
@@ -325,7 +325,7 @@ public:
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y.first);}
|
||||
bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x.first, __y);}
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y);}
|
||||
};
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
{
|
||||
const_cast<bool&>(__x.__value_constructed) = false;
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
@@ -573,10 +573,10 @@ public:
|
||||
explicit unordered_map(const allocator_type& __a);
|
||||
unordered_map(const unordered_map& __u);
|
||||
unordered_map(const unordered_map& __u, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_map(unordered_map&& __u);
|
||||
unordered_map(unordered_map&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
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());
|
||||
@@ -585,7 +585,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_map() = default;
|
||||
// unordered_map& operator=(const unordered_map& __u) = default;
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_map& operator=(unordered_map&& __u);
|
||||
#endif
|
||||
unordered_map& operator=(initializer_list<value_type> __il);
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
pair<iterator, bool> emplace()
|
||||
{return __table_.__emplace_unique();}
|
||||
|
||||
@@ -613,14 +613,10 @@ public:
|
||||
pair<iterator, bool> emplace(_A0&& __a0)
|
||||
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
pair<iterator, bool> emplace(_A0&& __a0, _Args&&... __args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator)
|
||||
{return __table_.__emplace_unique().first;}
|
||||
|
||||
@@ -629,31 +625,28 @@ public:
|
||||
iterator emplace_hint(const_iterator, _A0&& __a0)
|
||||
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0)).first;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace_hint(const_iterator, _A0&& __a0, _Args&&... __args)
|
||||
{return emplace(_STD::forward<_A0>(__a0),
|
||||
_STD::forward<_Args>(__args)...).first;}
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
pair<iterator, bool> insert(_P&& __x)
|
||||
{return __table_.__insert_unique(_STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator, const value_type& __x)
|
||||
{return insert(__x).first;}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(const_iterator, _P&& __x)
|
||||
{return insert(_STD::forward<_P>(__x)).first;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -681,7 +674,7 @@ public:
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
|
||||
mapped_type& operator[](const key_type& __k);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
mapped_type& operator[](key_type&& __k);
|
||||
#endif
|
||||
|
||||
@@ -709,16 +702,14 @@ public:
|
||||
void reserve(size_type __n) {__table_.reserve(__n);}
|
||||
|
||||
private:
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
__node_holder __construct_node(const key_type& __k);
|
||||
#endif
|
||||
};
|
||||
@@ -796,7 +787,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -821,7 +812,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
@@ -850,7 +841,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -861,7 +852,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -873,8 +864,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
@@ -895,8 +885,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0,
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0,
|
||||
class // = typename enable_if<is_convertible<_A0, value_type>::value>::type
|
||||
@@ -913,8 +901,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -930,8 +916,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_A0&& __a0, _Args&&... _
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder
|
||||
@@ -946,7 +931,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type&
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
@@ -972,7 +957,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
|
||||
return __r.first->second;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
_Tp&
|
||||
@@ -987,7 +972,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k)
|
||||
return __r.first->second;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
_Tp&
|
||||
@@ -997,7 +982,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__i == end())
|
||||
throw out_of_range("unordered_map::at: key not found");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __i->second;
|
||||
}
|
||||
|
||||
@@ -1009,7 +994,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k) const
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__i == end())
|
||||
throw out_of_range("unordered_map::at: key not found");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
return __i->second;
|
||||
}
|
||||
|
||||
@@ -1119,10 +1104,10 @@ public:
|
||||
explicit unordered_multimap(const allocator_type& __a);
|
||||
unordered_multimap(const unordered_multimap& __u);
|
||||
unordered_multimap(const unordered_multimap& __u, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_multimap(unordered_multimap&& __u);
|
||||
unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
unordered_multimap(initializer_list<value_type> __il);
|
||||
unordered_multimap(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -1132,7 +1117,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_multimap() = default;
|
||||
// unordered_multimap& operator=(const unordered_multimap& __u) = default;
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_multimap& operator=(unordered_multimap&& __u);
|
||||
#endif
|
||||
unordered_multimap& operator=(initializer_list<value_type> __il);
|
||||
@@ -1151,7 +1136,7 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator emplace()
|
||||
{return __table_.__emplace_multi();}
|
||||
|
||||
@@ -1160,14 +1145,10 @@ public:
|
||||
iterator emplace(_A0&& __a0)
|
||||
{return __table_.__emplace_multi(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace(_A0&& __a0, _Args&&... __args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator __p)
|
||||
{return __table_.__emplace_hint_multi(__p.__i_);}
|
||||
|
||||
@@ -1176,28 +1157,25 @@ public:
|
||||
iterator emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __table_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(_P&& __x)
|
||||
{return __table_.__insert_multi(_STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __x)
|
||||
{return __table_.__insert_multi(__p.__i_, __x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(const_iterator __p, _P&& __x)
|
||||
{return __table_.__insert_multi(__p.__i_, _STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -1245,14 +1223,14 @@ public:
|
||||
void reserve(size_type __n) {__table_.reserve(__n);}
|
||||
|
||||
private:
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&&... __args);
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
@@ -1302,6 +1280,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
insert(__first, __last);
|
||||
}
|
||||
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
@@ -1328,7 +1307,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1355,7 +1334,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
@@ -1384,7 +1363,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1395,7 +1374,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multima
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1407,8 +1386,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
@@ -1429,8 +1407,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0,
|
||||
class // = typename enable_if<is_convertible<_A0, value_type>::value>::type
|
||||
@@ -1447,8 +1423,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -1478,8 +1452,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace_hint(
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
|
@@ -317,10 +317,10 @@ public:
|
||||
explicit unordered_set(const allocator_type& __a);
|
||||
unordered_set(const unordered_set& __u);
|
||||
unordered_set(const unordered_set& __u, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_set(unordered_set&& __u);
|
||||
unordered_set(unordered_set&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
unordered_set(initializer_list<value_type> __il);
|
||||
unordered_set(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_set() = default;
|
||||
// unordered_set& operator=(const unordered_set& __u) = default;
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_set& operator=(unordered_set&& __u);
|
||||
#endif
|
||||
unordered_set& operator=(initializer_list<value_type> __il);
|
||||
@@ -349,26 +349,26 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> emplace(_Args&&... __args)
|
||||
{return __table_.__emplace_unique(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator, _Args&&... __args)
|
||||
{return __table_.__emplace_unique(_STD::forward<_Args>(__args)...).first;}
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
pair<iterator, bool> insert(value_type&& __x)
|
||||
{return __table_.__insert_unique(_STD::move(__x));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator, const value_type& __x)
|
||||
{return insert(__x).first;}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(const_iterator, value_type&& __x)
|
||||
{return insert(_STD::move(__x)).first;}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -485,7 +485,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -508,7 +508,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
@@ -537,7 +537,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -548,7 +548,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -656,10 +656,10 @@ public:
|
||||
explicit unordered_multiset(const allocator_type& __a);
|
||||
unordered_multiset(const unordered_multiset& __u);
|
||||
unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_multiset(unordered_multiset&& __u);
|
||||
unordered_multiset(unordered_multiset&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
unordered_multiset(initializer_list<value_type> __il);
|
||||
unordered_multiset(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -669,7 +669,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_multiset() = default;
|
||||
// unordered_multiset& operator=(const unordered_multiset& __u) = default;
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
unordered_multiset& operator=(unordered_multiset&& __u);
|
||||
#endif
|
||||
unordered_multiset& operator=(initializer_list<value_type> __il);
|
||||
@@ -688,24 +688,24 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class... _Args>
|
||||
iterator emplace(_Args&&... __args)
|
||||
{return __table_.__emplace_multi(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __table_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
#endif
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(value_type&& __x) {return __table_.__insert_multi(_STD::move(__x));}
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __x)
|
||||
{return __table_.__insert_multi(__p, __x);}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(const_iterator __p, value_type&& __x)
|
||||
{return __table_.__insert_multi(__p, _STD::move(__x));}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -823,7 +823,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -846,7 +846,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
@@ -875,7 +875,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -887,7 +887,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
|
@@ -100,6 +100,11 @@ template<size_t I, class T1, class T2>
|
||||
const typename const tuple_element<I, std::pair<T1, T2> >::type&
|
||||
get(const std::pair<T1, T2>&);
|
||||
|
||||
template <class InputIterator>
|
||||
InputIterator begin(const std::pair<InputIterator, InputIterator>& p);
|
||||
template <class InputIterator>
|
||||
InputIterator end(const std::pair<InputIterator, InputIterator>& p);
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
@@ -171,14 +176,14 @@ swap(_Tp (&__a)[_N], _Tp (&__b)[_N])
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
typename conditional
|
||||
<
|
||||
!has_nothrow_move_constructor<_Tp>::value && has_copy_constructor<_Tp>::value,
|
||||
const _Tp&,
|
||||
_Tp&&
|
||||
>::type
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
const _Tp&
|
||||
#endif
|
||||
move_if_noexcept(_Tp& __x)
|
||||
@@ -207,7 +212,7 @@ struct pair
|
||||
_LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
|
||||
: first(__x), second(__y) {}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _U1, class _U2,
|
||||
class = typename enable_if<is_convertible<_U1, first_type >::value &&
|
||||
@@ -218,8 +223,6 @@ struct pair
|
||||
second(_STD::forward<_U2>(__u2))
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template<class _Tuple,
|
||||
class = typename enable_if<__tuple_convertible<_Tuple, pair>::value>::type>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -230,13 +233,15 @@ struct pair
|
||||
typename __make_tuple_types<_Tuple>::type>::type>(get<1>(__p)))
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||
pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
|
||||
tuple<_Args2...> __second_args)
|
||||
: pair(__pc, __first_args, __second_args,
|
||||
: pair(__pc, __first_args, __second_args,
|
||||
typename __make_tuple_indices<sizeof...(_Args1)>::type(),
|
||||
typename __make_tuple_indices<sizeof...(_Args2) >::type())
|
||||
{}
|
||||
#endif
|
||||
|
||||
template <class _Tuple,
|
||||
class = typename enable_if<__tuple_assignable<_Tuple, pair>::value>::type>
|
||||
@@ -251,22 +256,20 @@ struct pair
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
template<class _U1, class _U2>
|
||||
_LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p)
|
||||
: first(__p.first), second(__p.second) {}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void _LIBCPP_INLINE_VISIBILITY swap(pair& __p) {_STD::swap(*this, __p);}
|
||||
private:
|
||||
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||
pair(piecewise_construct_t,
|
||||
tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
|
||||
__tuple_indices<_I1...>, __tuple_indices<_I2...>);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _T1, class _T2>
|
||||
@@ -326,7 +329,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
|
||||
swap(__x.second, __y.second);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp> class reference_wrapper;
|
||||
|
||||
@@ -357,7 +360,7 @@ make_pair(_T1&& __t1, _T2&& __t2)
|
||||
(_STD::forward<_T1>(__t1), _STD::forward<_T2>(__t2));
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#else
|
||||
|
||||
template <class _T1, class _T2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -367,7 +370,7 @@ make_pair(_T1 __x, _T2 __y)
|
||||
return pair<_T1, _T2>(__x, __y);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
@@ -455,7 +458,23 @@ get(const pair<_T1, _T2>& __p)
|
||||
return __get_pair<_Ip>::get(__p);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
template <class _InputIterator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
_InputIterator
|
||||
begin(const pair<_InputIterator, _InputIterator>& __p)
|
||||
{
|
||||
return __p.first;
|
||||
}
|
||||
|
||||
template <class _InputIterator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
_InputIterator
|
||||
end(const pair<_InputIterator, _InputIterator>& __p)
|
||||
{
|
||||
return __p.second;
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -795,10 +795,10 @@ public:
|
||||
valarray(const value_type& __x, size_t __n);
|
||||
valarray(const value_type* __p, size_t __n);
|
||||
valarray(const valarray& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
valarray(valarray&& __v);
|
||||
valarray(initializer_list<value_type> __il);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
valarray(const slice_array<value_type>& __sa);
|
||||
valarray(const gslice_array<value_type>& __ga);
|
||||
valarray(const mask_array<value_type>& __ma);
|
||||
@@ -807,10 +807,10 @@ public:
|
||||
|
||||
// assignment:
|
||||
valarray& operator=(const valarray& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
valarray& operator=(valarray&& __v);
|
||||
valarray& operator=(initializer_list<value_type>);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
valarray& operator=(const value_type& __x);
|
||||
valarray& operator=(const slice_array<value_type>& __sa);
|
||||
valarray& operator=(const gslice_array<value_type>& __ga);
|
||||
@@ -829,22 +829,22 @@ public:
|
||||
slice_array<value_type> operator[](slice __s);
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
|
||||
gslice_array<value_type> operator[](const gslice& __gs);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
|
||||
gslice_array<value_type> operator[](gslice&& __gs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const;
|
||||
mask_array<value_type> operator[](const valarray<bool>& __vb);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const;
|
||||
mask_array<value_type> operator[](valarray<bool>&& __vb);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
|
||||
indirect_array<value_type> operator[](const valarray<size_t>& __vs);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
|
||||
indirect_array<value_type> operator[](valarray<size_t>&& __vs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
// unary operators:
|
||||
valarray operator+() const;
|
||||
@@ -974,17 +974,17 @@ private:
|
||||
friend
|
||||
_Up*
|
||||
begin(valarray<_Up>& __v);
|
||||
|
||||
|
||||
template <class _Up>
|
||||
friend
|
||||
const _Up*
|
||||
begin(const valarray<_Up>& __v);
|
||||
|
||||
|
||||
template <class _Up>
|
||||
friend
|
||||
_Up*
|
||||
end(valarray<_Up>& __v);
|
||||
|
||||
|
||||
template <class _Up>
|
||||
friend
|
||||
const _Up*
|
||||
@@ -1383,7 +1383,7 @@ class gslice
|
||||
valarray<size_t> __size_;
|
||||
valarray<size_t> __stride_;
|
||||
valarray<size_t> __1d_;
|
||||
|
||||
|
||||
public:
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
gslice() {}
|
||||
@@ -1395,7 +1395,7 @@ public:
|
||||
__stride_(__stride)
|
||||
{__init(__start);}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
gslice(size_t __start, const valarray<size_t>& __size,
|
||||
@@ -1418,7 +1418,7 @@ public:
|
||||
__stride_(move(__stride))
|
||||
{__init(__start);}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
// gslice(const gslice&) = default;
|
||||
// gslice(gslice&&) = default;
|
||||
@@ -1559,7 +1559,7 @@ private:
|
||||
__1d_(__gs.__1d_)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
|
||||
@@ -1567,7 +1567,7 @@ private:
|
||||
__1d_(move(__gs.__1d_))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2232,7 +2232,7 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
|
||||
@@ -2240,7 +2240,7 @@ private:
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2450,14 +2450,14 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
|
||||
: __expr_(__e),
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
public:
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
@@ -2652,7 +2652,7 @@ valarray<_Tp>::valarray(const value_type* __p, size_t __n)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __n; ++__end_, ++__p, --__n)
|
||||
::new (__end_) value_type(*__p);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2662,7 +2662,7 @@ valarray<_Tp>::valarray(const value_type* __p, size_t __n)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2677,7 +2677,7 @@ valarray<_Tp>::valarray(const valarray& __v)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (value_type* __p = __v.__begin_; __p != __v.__end_; ++__end_, ++__p)
|
||||
::new (__end_) value_type(*__p);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2687,11 +2687,11 @@ valarray<_Tp>::valarray(const valarray& __v)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2714,7 +2714,7 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (const value_type* __p = __il.begin(); __n; ++__end_, ++__p, --__n)
|
||||
::new (__end_) value_type(*__p);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2724,11 +2724,11 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||
@@ -2742,7 +2742,7 @@ valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (const value_type* __p = __sa.__vp_; __n; ++__end_, __p += __sa.__stride_, --__n)
|
||||
::new (__end_) value_type(*__p);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2752,7 +2752,7 @@ valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2768,7 +2768,7 @@ valarray<_Tp>::valarray(const gslice_array<value_type>& __ga)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef const size_t* _Ip;
|
||||
const value_type* __s = __ga.__vp_;
|
||||
for (_Ip __i = __ga.__1d_.__begin_, __e = __ga.__1d_.__end_;
|
||||
@@ -2781,7 +2781,7 @@ valarray<_Tp>::valarray(const gslice_array<value_type>& __ga)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2797,7 +2797,7 @@ valarray<_Tp>::valarray(const mask_array<value_type>& __ma)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef const size_t* _Ip;
|
||||
const value_type* __s = __ma.__vp_;
|
||||
for (_Ip __i = __ma.__1d_.__begin_, __e = __ma.__1d_.__end_;
|
||||
@@ -2810,7 +2810,7 @@ valarray<_Tp>::valarray(const mask_array<value_type>& __ma)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2826,7 +2826,7 @@ valarray<_Tp>::valarray(const indirect_array<value_type>& __ia)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
typedef const size_t* _Ip;
|
||||
const value_type* __s = __ia.__vp_;
|
||||
for (_Ip __i = __ia.__1d_.__begin_, __e = __ia.__1d_.__end_;
|
||||
@@ -2839,7 +2839,7 @@ valarray<_Tp>::valarray(const indirect_array<value_type>& __ia)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2863,7 +2863,7 @@ valarray<_Tp>::operator=(const valarray& __v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2889,7 +2889,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2986,7 +2986,7 @@ valarray<_Tp>::operator[](const gslice& __gs)
|
||||
return gslice_array<value_type>(__gs, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3004,7 +3004,7 @@ valarray<_Tp>::operator[](gslice&& __gs)
|
||||
return gslice_array<value_type>(move(__gs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3022,7 +3022,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb)
|
||||
return mask_array<value_type>(__vb, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3040,7 +3040,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb)
|
||||
return mask_array<value_type>(move(__vb), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3058,7 +3058,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs)
|
||||
return indirect_array<value_type>(__vs, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3076,7 +3076,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs)
|
||||
return indirect_array<value_type>(move(__vs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>
|
||||
@@ -3559,7 +3559,7 @@ valarray<_Tp>::resize(size_t __n, value_type __x)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __n; --__n, ++__end_)
|
||||
::new (__end_) value_type(__x);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -3569,7 +3569,7 @@ valarray<_Tp>::resize(size_t __n, value_type __x)
|
||||
resize(0);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
150
include/vector
150
include/vector
@@ -17,11 +17,11 @@
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <class T, class Allocator = allocator<T> >
|
||||
template <class T, class Allocator = allocator<T> >
|
||||
class vector
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename allocator_type::reference reference;
|
||||
typedef typename allocator_type::const_reference const_reference;
|
||||
@@ -114,13 +114,13 @@ public:
|
||||
void swap(vector&);
|
||||
|
||||
bool __invariants() const;
|
||||
};
|
||||
};
|
||||
|
||||
template <class Allocator = allocator<T> >
|
||||
template <class Allocator = allocator<T> >
|
||||
class vector<bool, Allocator>
|
||||
{
|
||||
public:
|
||||
typedef bool value_type;
|
||||
{
|
||||
public:
|
||||
typedef bool value_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef implementation-defined iterator;
|
||||
typedef implementation-defined const_iterator;
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
void flip();
|
||||
|
||||
bool __invariants() const;
|
||||
};
|
||||
};
|
||||
|
||||
template <class Allocator> struct hash<std::vector<bool, Allocator>>;
|
||||
|
||||
@@ -297,7 +297,7 @@ class __vector_base
|
||||
: protected __vector_base_common<true>
|
||||
{
|
||||
protected:
|
||||
typedef _Tp value_type;
|
||||
typedef _Tp value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
typedef allocator_traits<allocator_type> __alloc_traits;
|
||||
typedef value_type& reference;
|
||||
@@ -419,14 +419,14 @@ __vector_base<_Tp, _Allocator>::~__vector_base()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator = allocator<_Tp> >
|
||||
class _LIBCPP_VISIBLE vector
|
||||
class vector
|
||||
: private __vector_base<_Tp, _Allocator>
|
||||
{
|
||||
private:
|
||||
typedef __vector_base<_Tp, _Allocator> __base;
|
||||
public:
|
||||
public:
|
||||
typedef vector __self;
|
||||
typedef _Tp value_type;
|
||||
typedef _Tp value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
typedef typename __base::__alloc_traits __alloc_traits;
|
||||
typedef typename __base::reference reference;
|
||||
@@ -449,10 +449,10 @@ public:
|
||||
#elif defined(_LIBCPP_RAW_ITERATORS)
|
||||
typedef pointer iterator;
|
||||
typedef const_pointer const_iterator;
|
||||
#else // defined(_LIBCPP_RAW_ITERATORS)
|
||||
#else
|
||||
typedef __wrap_iter<pointer> iterator;
|
||||
typedef __wrap_iter<const_pointer> const_iterator;
|
||||
#endif // defined(_LIBCPP_RAW_ITERATORS)
|
||||
#endif
|
||||
typedef _STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef _STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
@@ -484,11 +484,11 @@ public:
|
||||
vector(const vector& __x);
|
||||
vector(const vector& __x, const allocator_type& __a);
|
||||
vector& operator=(const vector& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
vector(vector&& __x);
|
||||
vector(vector&& __x, const allocator_type& __a);
|
||||
vector& operator=(vector&& __x);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
vector& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -552,23 +552,19 @@ public:
|
||||
{return _STD::__to_raw_pointer(this->__begin_);}
|
||||
|
||||
void push_back(const_reference __x);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
void push_back(value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
void pop_back();
|
||||
|
||||
iterator insert(const_iterator __position, const_reference __x);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
iterator insert(const_iterator __position, value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
iterator emplace(const_iterator __position, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
iterator insert(const_iterator __position, size_type __n, const_reference __x);
|
||||
template <class _InputIterator>
|
||||
typename enable_if
|
||||
@@ -955,7 +951,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1047,7 +1043,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
|
||||
__c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1132,7 +1128,7 @@ vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
vector<_Tp, _Allocator>::__make_iter(pointer __p)
|
||||
@@ -1144,7 +1140,7 @@ vector<_Tp, _Allocator>::__make_iter(pointer __p)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::const_iterator
|
||||
vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const
|
||||
@@ -1156,7 +1152,7 @@ vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
vector<_Tp, _Allocator>::begin()
|
||||
@@ -1164,7 +1160,7 @@ vector<_Tp, _Allocator>::begin()
|
||||
return __make_iter(this->__begin_);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::const_iterator
|
||||
vector<_Tp, _Allocator>::begin() const
|
||||
@@ -1172,7 +1168,7 @@ vector<_Tp, _Allocator>::begin() const
|
||||
return __make_iter(this->__begin_);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
vector<_Tp, _Allocator>::end()
|
||||
@@ -1180,7 +1176,7 @@ vector<_Tp, _Allocator>::end()
|
||||
return __make_iter(this->__end_);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::const_iterator
|
||||
vector<_Tp, _Allocator>::end() const
|
||||
@@ -1188,7 +1184,7 @@ vector<_Tp, _Allocator>::end() const
|
||||
return __make_iter(this->__end_);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::reference
|
||||
vector<_Tp, _Allocator>::operator[](size_type __n)
|
||||
@@ -1199,7 +1195,7 @@ vector<_Tp, _Allocator>::operator[](size_type __n)
|
||||
return this->__begin_[__n];
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
typename vector<_Tp, _Allocator>::const_reference
|
||||
vector<_Tp, _Allocator>::operator[](size_type __n) const
|
||||
@@ -1210,7 +1206,7 @@ vector<_Tp, _Allocator>::operator[](size_type __n) const
|
||||
return this->__begin_[__n];
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::reference
|
||||
vector<_Tp, _Allocator>::at(size_type __n)
|
||||
{
|
||||
@@ -1219,7 +1215,7 @@ vector<_Tp, _Allocator>::at(size_type __n)
|
||||
return this->__begin_[__n];
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::const_reference
|
||||
vector<_Tp, _Allocator>::at(size_type __n) const
|
||||
{
|
||||
@@ -1252,7 +1248,7 @@ vector<_Tp, _Allocator>::shrink_to_fit()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
allocator_type& __a = this->__alloc();
|
||||
__split_buffer<value_type, allocator_type&> __v(size(), 0, __a);
|
||||
__v.__construct_at_end(move_iterator<pointer>(this->__begin_),
|
||||
@@ -1264,7 +1260,7 @@ vector<_Tp, _Allocator>::shrink_to_fit()
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1287,7 +1283,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1309,8 +1305,6 @@ vector<_Tp, _Allocator>::push_back(value_type&& __x)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1332,8 +1326,7 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1409,7 +1402,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1441,8 +1434,6 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1474,8 +1465,7 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1540,7 +1530,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __firs
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__v.__construct_at_end(__first, __last);
|
||||
difference_type __old_size = __old_last - this->__begin_;
|
||||
difference_type __old_p = __p - this->__begin_;
|
||||
@@ -1554,7 +1544,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __firs
|
||||
erase(__make_iter(__old_last), end());
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
__p = _STD::rotate(__p, __old_last, this->__end_);
|
||||
insert(__make_iter(__p), move_iterator<iterator>(__v.begin()),
|
||||
@@ -1638,10 +1628,10 @@ vector<_Tp, _Allocator>::swap(vector& __x)
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
iterator::swap(this, &__x);
|
||||
const_iterator::swap(this, &__x);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _Tp, class _Allocator>
|
||||
bool
|
||||
vector<_Tp, _Allocator>::__invariants() const
|
||||
{
|
||||
@@ -1672,7 +1662,7 @@ vector<_Tp, _Allocator>::__invalidate_all_iterators()
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
iterator::__remove_all(this);
|
||||
const_iterator::__remove_all(this);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
// vector<bool>
|
||||
@@ -1682,12 +1672,12 @@ template <class _Allocator> class vector<bool, _Allocator>;
|
||||
template <class _Allocator> struct hash<vector<bool, _Allocator> >;
|
||||
|
||||
template <class _Allocator>
|
||||
class _LIBCPP_VISIBLE vector<bool, _Allocator>
|
||||
class vector<bool, _Allocator>
|
||||
: private __vector_base_common<true>
|
||||
{
|
||||
public:
|
||||
typedef vector __self;
|
||||
typedef bool value_type;
|
||||
typedef bool value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
typedef allocator_traits<allocator_type> __alloc_traits;
|
||||
typedef __bit_reference<vector> reference;
|
||||
@@ -1707,10 +1697,10 @@ public:
|
||||
|
||||
_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;}
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else
|
||||
typedef pointer iterator;
|
||||
typedef const_pointer const_iterator;
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
typedef _STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef _STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
@@ -1771,11 +1761,11 @@ public:
|
||||
vector(initializer_list<value_type> __il);
|
||||
vector(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
vector(vector&& __v);
|
||||
vector(vector&& __v, const allocator_type& __a);
|
||||
vector& operator=(vector&& __v);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
vector& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -1897,14 +1887,14 @@ private:
|
||||
{return const_iterator(this, const_pointer(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word)));}
|
||||
_LIBCPP_INLINE_VISIBILITY iterator __const_iterator_cast(const_iterator __p)
|
||||
{return iterator(this, pointer(const_cast<__storage_pointer>(__p.base().__seg_), __p.base().__ctz_));}
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else
|
||||
_LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_type __pos)
|
||||
{return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_type __pos) const
|
||||
{return const_iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
|
||||
_LIBCPP_INLINE_VISIBILITY iterator __const_iterator_cast(const_iterator __p)
|
||||
{return iterator(const_cast<__storage_pointer>(__p.__seg_), __p.__ctz_);}
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
|
||||
void __copy_assign_alloc(const vector& __v)
|
||||
{__copy_assign_alloc(__v, integral_constant<bool,
|
||||
@@ -1964,7 +1954,7 @@ vector<bool, _Allocator>::__invalidate_all_iterators()
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
iterator::__remove_all(this);
|
||||
const_iterator::__remove_all(this);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
// Allocate space for __n objects
|
||||
@@ -2122,7 +2112,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __first != __last; ++__first)
|
||||
push_back(*__first);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2134,7 +2124,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
|
||||
__invalidate_all_iterators();
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
@@ -2149,7 +2139,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
for (; __first != __last; ++__first)
|
||||
push_back(*__first);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
@@ -2161,7 +2151,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
|
||||
__invalidate_all_iterators();
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
@@ -2282,8 +2272,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
vector<bool, _Allocator>::vector(vector&& __v)
|
||||
@@ -2348,8 +2337,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
|
||||
__c.__begin_ = nullptr;
|
||||
__c.__cap() = __c.__size_ = 0;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
template <class _Allocator>
|
||||
void
|
||||
@@ -2432,14 +2420,14 @@ vector<bool, _Allocator>::shrink_to_fit()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
vector(*this, allocator_type(__alloc())).swap(*this);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2546,7 +2534,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __fir
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
__v.assign(__first, __last);
|
||||
difference_type __old_size = static_cast<difference_type>(__old_end - begin());
|
||||
difference_type __old_p = __p - begin();
|
||||
@@ -2560,7 +2548,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __fir
|
||||
erase(__old_end, end());
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
}
|
||||
__p = _STD::rotate(__p, __old_end, end());
|
||||
insert(__p, __v.begin(), __v.end());
|
||||
@@ -2632,10 +2620,10 @@ vector<bool, _Allocator>::swap(vector& __x)
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
iterator::swap(this, &__x);
|
||||
const_iterator::swap(this, &__x);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
template <class _Allocator>
|
||||
void
|
||||
vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
|
||||
{
|
||||
@@ -2664,7 +2652,7 @@ vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
|
||||
__size_ = __sz;
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
template <class _Allocator>
|
||||
void
|
||||
vector<bool, _Allocator>::flip()
|
||||
{
|
||||
@@ -2683,7 +2671,7 @@ vector<bool, _Allocator>::flip()
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
template <class _Allocator>
|
||||
bool
|
||||
vector<bool, _Allocator>::__invariants() const
|
||||
{
|
||||
@@ -2702,7 +2690,7 @@ vector<bool, _Allocator>::__invariants() const
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class _Allocator>
|
||||
template <class _Allocator>
|
||||
size_t
|
||||
vector<bool, _Allocator>::__hash_code() const
|
||||
{
|
||||
|
43
lib/buildit
43
lib/buildit
@@ -17,45 +17,19 @@ then
|
||||
CXX=g++
|
||||
fi
|
||||
|
||||
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
|
||||
then
|
||||
MACOSX_DEPLOYMENT_TARGET=10.6
|
||||
fi
|
||||
|
||||
if [ -z $RC_ProjectSourceVersion ]
|
||||
then
|
||||
RC_ProjectSourceVersion=1
|
||||
fi
|
||||
|
||||
case $TRIPLE in
|
||||
*-apple-*)
|
||||
if [ -z $RC_BUILDIT ]
|
||||
then
|
||||
RC_CFLAGS="-arch i386 -arch x86_64"
|
||||
RC_CFLAGS="-arch i386 -arch ppc -arch x86_64"
|
||||
fi
|
||||
SOEXT=dylib
|
||||
if [ "$MACOSX_DEPLOYMENT_TARGET" == "10.6" ]
|
||||
then
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs -current_version 1 \
|
||||
-compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
||||
/usr/lib/libSystem.B.dylib"
|
||||
else
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs \
|
||||
-current_version ${RC_ProjectSourceVersion} -compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
${SDKROOT}/usr/lib/libc++abi.dylib \
|
||||
-lSystem \
|
||||
-Xarch_x86_64 -exported_symbols_list \
|
||||
-Xarch_x86_64 x86_64.exp \
|
||||
-Xarch_i386 -exported_symbols_list \
|
||||
-Xarch_i386 i386.exp \
|
||||
-exported_symbols_list libc++abi.exp \
|
||||
-Wl,-force_symbols_not_weak_list,notweak.exp"
|
||||
fi
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs -current_version 1 \
|
||||
-compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
||||
/usr/lib/libSystem.B.dylib"
|
||||
;;
|
||||
*)
|
||||
RC_CFLAGS="-fPIC"
|
||||
@@ -77,8 +51,7 @@ for FILE in ../src/*.cpp; do
|
||||
$CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
|
||||
done
|
||||
|
||||
|
||||
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
||||
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
||||
|
||||
#libtool -static -o libc++.a *.o
|
||||
|
||||
|
2262
lib/i386.exp
2262
lib/i386.exp
File diff suppressed because it is too large
Load Diff
@@ -1,150 +0,0 @@
|
||||
___cxa_allocate_exception
|
||||
___cxa_end_catch
|
||||
___cxa_demangle
|
||||
___cxa_current_exception_type
|
||||
___cxa_call_unexpected
|
||||
___cxa_free_exception
|
||||
___cxa_get_exception_ptr
|
||||
___cxa_get_globals
|
||||
___cxa_get_globals_fast
|
||||
___cxa_guard_abort
|
||||
___cxa_guard_acquire
|
||||
___cxa_guard_release
|
||||
___cxa_rethrow
|
||||
___cxa_pure_virtual
|
||||
___cxa_begin_catch
|
||||
___cxa_throw
|
||||
___cxa_vec_cctor
|
||||
___cxa_vec_cleanup
|
||||
___cxa_vec_ctor
|
||||
___cxa_vec_delete
|
||||
___cxa_vec_delete2
|
||||
___cxa_vec_delete3
|
||||
___cxa_vec_dtor
|
||||
___cxa_vec_new
|
||||
___cxa_vec_new2
|
||||
___cxa_vec_new3
|
||||
___dynamic_cast
|
||||
___gxx_personality_v0
|
||||
__ZTSPm
|
||||
__ZTSPl
|
||||
__ZTSPj
|
||||
__ZTSPi
|
||||
__ZTSPh
|
||||
__ZTSPf
|
||||
__ZTSPe
|
||||
__ZTSPd
|
||||
__ZTSPc
|
||||
__ZTSPb
|
||||
__ZTSPa
|
||||
__ZTSPKc
|
||||
__ZTSPKy
|
||||
__ZTSPKx
|
||||
__ZTSPKw
|
||||
__ZTSPKv
|
||||
__ZTSPKt
|
||||
__ZTSPKs
|
||||
__ZTSPKm
|
||||
__ZTSPKl
|
||||
__ZTSPKi
|
||||
__ZTSPKh
|
||||
__ZTSPs
|
||||
__ZTSPt
|
||||
__ZTSPv
|
||||
__ZTSPw
|
||||
__ZTSPKa
|
||||
__ZTSPx
|
||||
__ZTSPy
|
||||
__ZTSPKd
|
||||
__ZTSPKe
|
||||
__ZTSPKj
|
||||
__ZTSPKb
|
||||
__ZTSPKf
|
||||
__ZTSv
|
||||
__ZTSt
|
||||
__ZTSs
|
||||
__ZTSm
|
||||
__ZTSl
|
||||
__ZTSj
|
||||
__ZTSi
|
||||
__ZTSh
|
||||
__ZTSf
|
||||
__ZTSe
|
||||
__ZTSd
|
||||
__ZTSc
|
||||
__ZTSw
|
||||
__ZTSx
|
||||
__ZTSy
|
||||
__ZTSb
|
||||
__ZTSa
|
||||
__ZTIPKh
|
||||
__ZTIPKf
|
||||
__ZTIPKe
|
||||
__ZTIPKd
|
||||
__ZTIPKc
|
||||
__ZTIPKb
|
||||
__ZTIPKa
|
||||
__ZTIPy
|
||||
__ZTIPx
|
||||
__ZTIPw
|
||||
__ZTIPv
|
||||
__ZTIPt
|
||||
__ZTIPs
|
||||
__ZTIPm
|
||||
__ZTIPl
|
||||
__ZTIPj
|
||||
__ZTIPi
|
||||
__ZTIPKi
|
||||
__ZTIPKj
|
||||
__ZTIPKl
|
||||
__ZTIPKm
|
||||
__ZTIPKs
|
||||
__ZTIPKt
|
||||
__ZTIPKv
|
||||
__ZTIPKw
|
||||
__ZTIPKx
|
||||
__ZTIPKy
|
||||
__ZTIPa
|
||||
__ZTIPb
|
||||
__ZTIPc
|
||||
__ZTIPd
|
||||
__ZTIPe
|
||||
__ZTIPf
|
||||
__ZTIPh
|
||||
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
|
||||
__ZTVN10__cxxabiv116__enum_type_infoE
|
||||
__ZTVN10__cxxabiv117__array_type_infoE
|
||||
__ZTVN10__cxxabiv117__class_type_infoE
|
||||
__ZTVN10__cxxabiv117__pbase_type_infoE
|
||||
__ZTVN10__cxxabiv119__pointer_type_infoE
|
||||
__ZTVN10__cxxabiv120__function_type_infoE
|
||||
__ZTVN10__cxxabiv120__si_class_type_infoE
|
||||
__ZTVN10__cxxabiv121__vmi_class_type_infoE
|
||||
__ZTVN10__cxxabiv123__fundamental_type_infoE
|
||||
__ZTIa
|
||||
__ZTIb
|
||||
__ZTIc
|
||||
__ZTId
|
||||
__ZTIe
|
||||
__ZTIf
|
||||
__ZTIh
|
||||
__ZTIi
|
||||
__ZTIj
|
||||
__ZTIl
|
||||
__ZTIm
|
||||
__ZTIs
|
||||
__ZTIt
|
||||
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE
|
||||
__ZTSN10__cxxabiv123__fundamental_type_infoE
|
||||
__ZTSN10__cxxabiv121__vmi_class_type_infoE
|
||||
__ZTSN10__cxxabiv120__si_class_type_infoE
|
||||
__ZTSN10__cxxabiv120__function_type_infoE
|
||||
__ZTSN10__cxxabiv119__pointer_type_infoE
|
||||
__ZTSN10__cxxabiv117__pbase_type_infoE
|
||||
__ZTSN10__cxxabiv117__class_type_infoE
|
||||
__ZTSN10__cxxabiv117__array_type_infoE
|
||||
__ZTSN10__cxxabiv116__enum_type_infoE
|
||||
__ZTIy
|
||||
__ZTIx
|
||||
__ZTIw
|
||||
__ZTIv
|
@@ -1,5 +0,0 @@
|
||||
# Remove the weak-def bit from these external symbols
|
||||
__ZT*
|
||||
__ZN*
|
||||
__ZS*
|
||||
|
2264
lib/x86_64.exp
2264
lib/x86_64.exp
File diff suppressed because it is too large
Load Diff
@@ -27,4 +27,5 @@ __ph<10> _10;
|
||||
|
||||
} // placeholders
|
||||
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include <cerrno> // errno
|
||||
#include <system_error> // __throw_system_error
|
||||
#include <time.h> // clock_gettime, CLOCK_MONOTONIC
|
||||
#endif // __APPLE__
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
@@ -94,7 +94,7 @@ init_monotonic_clock()
|
||||
return &monotonic_full;
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
||||
#pragma GCC visiblity pop
|
||||
|
||||
monotonic_clock::time_point
|
||||
monotonic_clock::now()
|
||||
@@ -103,7 +103,7 @@ monotonic_clock::now()
|
||||
return time_point(duration(fp()));
|
||||
}
|
||||
|
||||
#else // __APPLE__
|
||||
#else /* !APPLE */
|
||||
// FIXME: We assume that clock_gettime(CLOCK_MONOTONIC) works on
|
||||
// non-apple systems. Instead, we should check _POSIX_TIMERS and
|
||||
// _POSIX_MONOTONIC_CLOCK and fall back to something else if those
|
||||
@@ -121,7 +121,7 @@ monotonic_clock::now()
|
||||
__throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed");
|
||||
return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec));
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif /* APPLE */
|
||||
|
||||
}
|
||||
|
||||
|
@@ -61,10 +61,4 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
|
||||
__throw_system_error(ec, "condition_variable timed_wait failed");
|
||||
}
|
||||
|
||||
void
|
||||
notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
|
||||
{
|
||||
__thread_local_data->notify_all_at_thread_exit(&cond, lk.release());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -18,12 +18,14 @@
|
||||
// current unexpected handler are in the ABI library.
|
||||
#define __terminate_handler __cxxabiapple::__cxa_terminate_handler
|
||||
#define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler
|
||||
#else // __APPLE__
|
||||
#else
|
||||
static std::terminate_handler __terminate_handler;
|
||||
static std::unexpected_handler __unexpected_handler;
|
||||
#endif // __APPLE__
|
||||
#endif
|
||||
|
||||
std::unexpected_handler
|
||||
|
||||
|
||||
std::unexpected_handler
|
||||
std::set_unexpected(std::unexpected_handler func) throw()
|
||||
{
|
||||
std::terminate_handler old = __unexpected_handler;
|
||||
@@ -35,11 +37,12 @@ void
|
||||
std::unexpected()
|
||||
{
|
||||
(*__unexpected_handler)();
|
||||
// unexpected handler should not return
|
||||
// unexpected handler should not return
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
std::terminate_handler
|
||||
|
||||
std::terminate_handler
|
||||
std::set_terminate(std::terminate_handler func) throw()
|
||||
{
|
||||
std::terminate_handler old = __terminate_handler;
|
||||
@@ -47,49 +50,47 @@ std::set_terminate(std::terminate_handler func) throw()
|
||||
return old;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
std::terminate()
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
try {
|
||||
(*__terminate_handler)();
|
||||
// handler should not return
|
||||
::abort ();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
catch (...) {
|
||||
// handler should not throw exception
|
||||
::abort ();
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
|
||||
bool std::uncaught_exception() throw()
|
||||
{
|
||||
#if __APPLE__
|
||||
// on Darwin, there is a helper function so __cxa_get_globals is private
|
||||
// on Darwin, there is a helper function so __cxa_get_globals is private
|
||||
return __cxxabiapple::__cxa_uncaught_exception();
|
||||
#else // __APPLE__
|
||||
#else
|
||||
#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__
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace std
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
exception::~exception() throw()
|
||||
{
|
||||
|
||||
exception::~exception() throw()
|
||||
{
|
||||
}
|
||||
|
||||
bad_exception::~bad_exception() throw()
|
||||
{
|
||||
bad_exception::~bad_exception() throw()
|
||||
{
|
||||
}
|
||||
|
||||
const char* exception::what() const throw()
|
||||
@@ -102,14 +103,16 @@ const char* bad_exception::what() const throw()
|
||||
return "std::bad_exception";
|
||||
}
|
||||
|
||||
|
||||
|
||||
exception_ptr::~exception_ptr()
|
||||
{
|
||||
#if __APPLE__
|
||||
__cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
|
||||
#else
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif // __APPLE__
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
exception_ptr::exception_ptr(const exception_ptr& other)
|
||||
@@ -118,9 +121,9 @@ exception_ptr::exception_ptr(const exception_ptr& other)
|
||||
#if __APPLE__
|
||||
__cxxabiapple::__cxa_increment_exception_refcount(__ptr_);
|
||||
#else
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif // __APPLE__
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
exception_ptr& exception_ptr::operator=(const exception_ptr& other)
|
||||
@@ -130,13 +133,13 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other)
|
||||
{
|
||||
__cxxabiapple::__cxa_increment_exception_refcount(other.__ptr_);
|
||||
__cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
|
||||
__ptr_ = other.__ptr_;
|
||||
}
|
||||
__ptr_ = other.__ptr_;
|
||||
}
|
||||
return *this;
|
||||
#else // __APPLE__
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif // __APPLE__
|
||||
#else
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
nested_exception::nested_exception()
|
||||
@@ -158,29 +161,30 @@ nested_exception::rethrow_nested /*[[noreturn]]*/ () const
|
||||
|
||||
} // std
|
||||
|
||||
|
||||
std::exception_ptr std::current_exception()
|
||||
{
|
||||
#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());
|
||||
// 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_ = __cxxabiapple::__cxa_current_primary_exception();
|
||||
return ptr;
|
||||
#else // __APPLE__
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif // __APPLE__
|
||||
ptr.__ptr_ = __cxxabiapple::__cxa_current_primary_exception();
|
||||
return ptr;
|
||||
#else
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
void std::rethrow_exception(exception_ptr p)
|
||||
{
|
||||
#if __APPLE__
|
||||
__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
|
||||
// if p.__ptr_ is NULL, above returns so we terminate
|
||||
terminate();
|
||||
#else // __APPLE__
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif // __APPLE__
|
||||
__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
|
||||
// if p.__ptr_ is NULL, above returns so we terminate
|
||||
terminate();
|
||||
#else
|
||||
#warning exception_ptr not yet implemented
|
||||
::abort();
|
||||
#endif
|
||||
}
|
||||
|
294
src/future.cpp
294
src/future.cpp
@@ -1,294 +0,0 @@
|
||||
//===------------------------- future.cpp ---------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "future"
|
||||
#include "string"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
class _LIBCPP_HIDDEN __future_error_category
|
||||
: public __do_message
|
||||
{
|
||||
public:
|
||||
virtual const char* name() const;
|
||||
virtual string message(int ev) const;
|
||||
};
|
||||
|
||||
const char*
|
||||
__future_error_category::name() const
|
||||
{
|
||||
return "future";
|
||||
}
|
||||
|
||||
string
|
||||
__future_error_category::message(int ev) const
|
||||
{
|
||||
switch (ev)
|
||||
{
|
||||
case future_errc::broken_promise:
|
||||
return string("The associated promise has been destructed prior "
|
||||
"to the associated state becoming ready.");
|
||||
case future_errc::future_already_retrieved:
|
||||
return string("The future has already been retrieved from "
|
||||
"the promise or packaged_task.");
|
||||
case future_errc::promise_already_satisfied:
|
||||
return string("The state of the promise has already been set.");
|
||||
case future_errc::no_state:
|
||||
return string("Operation not permitted on an object without "
|
||||
"an associated state.");
|
||||
}
|
||||
return string("unspecified future_errc value\n");
|
||||
}
|
||||
|
||||
const error_category&
|
||||
future_category()
|
||||
{
|
||||
static __future_error_category __f;
|
||||
return __f;
|
||||
}
|
||||
|
||||
future_error::future_error(error_code __ec)
|
||||
: logic_error(__ec.message()),
|
||||
__ec_(__ec)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__on_zero_shared()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_value()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__state_ |= __constructed | ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_value_at_thread_exit()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__state_ |= __constructed;
|
||||
__thread_local_data->__make_ready_at_thread_exit(this);
|
||||
__lk.unlock();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_exception(exception_ptr __p)
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__exception_ = __p;
|
||||
__state_ |= ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_exception_at_thread_exit(exception_ptr __p)
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__exception_ = __p;
|
||||
__thread_local_data->__make_ready_at_thread_exit(this);
|
||||
__lk.unlock();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__make_ready()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__state_ |= ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::copy()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__sub_wait(__lk);
|
||||
if (__exception_ != nullptr)
|
||||
rethrow_exception(__exception_);
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::wait()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__sub_wait(__lk);
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__sub_wait(unique_lock<mutex>& __lk)
|
||||
{
|
||||
if (!__is_ready())
|
||||
{
|
||||
if (__state_ & deferred)
|
||||
{
|
||||
__state_ &= ~deferred;
|
||||
__lk.unlock();
|
||||
__execute();
|
||||
}
|
||||
else
|
||||
while (!__is_ready())
|
||||
__cv_.wait(__lk);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__execute()
|
||||
{
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
}
|
||||
|
||||
future<void>::future(__assoc_sub_state* __state)
|
||||
: __state_(__state)
|
||||
{
|
||||
if (__state_->__has_future_attached())
|
||||
throw future_error(make_error_code(future_errc::future_already_retrieved));
|
||||
__state_->__add_shared();
|
||||
__state_->__set_future_attached();
|
||||
}
|
||||
|
||||
future<void>::~future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
void
|
||||
future<void>::get()
|
||||
{
|
||||
unique_ptr<__shared_count, __release_shared_count> __(__state_);
|
||||
__assoc_sub_state* __s = __state_;
|
||||
__state_ = nullptr;
|
||||
__s->copy();
|
||||
}
|
||||
|
||||
promise<void>::promise()
|
||||
: __state_(new __assoc_sub_state)
|
||||
{
|
||||
}
|
||||
|
||||
promise<void>::~promise()
|
||||
{
|
||||
if (__state_)
|
||||
{
|
||||
if (!__state_->__has_value() && __state_->use_count() > 1)
|
||||
__state_->set_exception(make_exception_ptr(
|
||||
future_error(make_error_code(future_errc::broken_promise))
|
||||
));
|
||||
__state_->__release_shared();
|
||||
}
|
||||
}
|
||||
|
||||
future<void>
|
||||
promise<void>::get_future()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
return future<void>(__state_);
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_value()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_value();
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_exception(exception_ptr __p)
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_exception(__p);
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_value_at_thread_exit()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_value_at_thread_exit();
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_exception_at_thread_exit(exception_ptr __p)
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_exception_at_thread_exit(__p);
|
||||
}
|
||||
|
||||
shared_future<void>::~shared_future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
shared_future<void>&
|
||||
shared_future<void>::operator=(const shared_future& __rhs)
|
||||
{
|
||||
if (__rhs.__state_)
|
||||
__rhs.__state_->__add_shared();
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
__state_ = __rhs.__state_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
atomic_future<void>::~atomic_future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
atomic_future<void>&
|
||||
atomic_future<void>::operator=(const atomic_future& __rhs)
|
||||
{
|
||||
if (this != &__rhs)
|
||||
{
|
||||
unique_lock<mutex> __this(__mut_, defer_lock);
|
||||
unique_lock<mutex> __that(__rhs.__mut_, defer_lock);
|
||||
_STD::lock(__this, __that);
|
||||
if (__rhs.__state_)
|
||||
__rhs.__state_->__add_shared();
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
__state_ = __rhs.__state_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
atomic_future<void>::swap(atomic_future& __rhs)
|
||||
{
|
||||
if (this != &__rhs)
|
||||
{
|
||||
unique_lock<mutex> __this(__mut_, defer_lock);
|
||||
unique_lock<mutex> __that(__rhs.__mut_, defer_lock);
|
||||
_STD::lock(__this, __that);
|
||||
_STD::swap(__state_, __rhs.__state_);
|
||||
}
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
@@ -126,14 +126,14 @@ const unsigned indices[] =
|
||||
|
||||
// Returns: If n == 0, returns 0. Else returns the lowest prime number that
|
||||
// is greater than or equal to n.
|
||||
//
|
||||
//
|
||||
// The algorithm creates a list of small primes, plus an open-ended list of
|
||||
// potential primes. All prime numbers are potential prime numbers. However
|
||||
// some potential prime numbers are not prime. In an ideal world, all potential
|
||||
// prime numbers would be prime. Candiate prime numbers are chosen as the next
|
||||
// highest potential prime. Then this number is tested for prime by dividing it
|
||||
// by all potential prime numbers less than the sqrt of the candidate.
|
||||
//
|
||||
//
|
||||
// This implementation defines potential primes as those numbers not divisible
|
||||
// by 2, 3, 5, and 7. Other (common) implementations define potential primes
|
||||
// as those not divisible by 2. A few other implementations define potential
|
||||
|
14
src/ios.cpp
14
src/ios.cpp
@@ -260,10 +260,8 @@ ios_base::clear(iostate state)
|
||||
__rdstate_ = state;
|
||||
else
|
||||
__rdstate_ = state | badbit;
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (((state | (__rdbuf_ ? goodbit : badbit)) & __exceptions_) != 0)
|
||||
throw failure("ios_base::clear");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
// init
|
||||
@@ -302,31 +300,23 @@ ios_base::copyfmt(const ios_base& rhs)
|
||||
if (__event_cap_ < rhs.__event_size_)
|
||||
{
|
||||
new_callbacks.reset((event_callback*)malloc(sizeof(event_callback) * rhs.__event_size_));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!new_callbacks)
|
||||
throw bad_alloc();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
new_ints.reset((int*)malloc(sizeof(int) * rhs.__event_size_));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!new_ints)
|
||||
throw bad_alloc();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (__iarray_cap_ < rhs.__iarray_size_)
|
||||
{
|
||||
new_longs.reset((long*)malloc(sizeof(long) * rhs.__iarray_size_));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!new_longs)
|
||||
throw bad_alloc();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (__parray_cap_ < rhs.__parray_size_)
|
||||
{
|
||||
new_pointers.reset((void**)malloc(sizeof(void*) * rhs.__parray_size_));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!new_pointers)
|
||||
throw bad_alloc();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
// Got everything we need. Copy everything but __rdstate_, __rdbuf_ and __exceptions_
|
||||
__fmtflags_ = rhs.__fmtflags_;
|
||||
@@ -427,20 +417,16 @@ void
|
||||
ios_base::__set_badbit_and_consider_rethrow()
|
||||
{
|
||||
__rdstate_ |= badbit;
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__exceptions_ & badbit)
|
||||
throw;
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
void
|
||||
ios_base::__set_failbit_and_consider_rethrow()
|
||||
{
|
||||
__rdstate_ |= failbit;
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__exceptions_ & failbit)
|
||||
throw;
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
bool
|
||||
|
@@ -132,10 +132,8 @@ locale::__imp::__imp(const string& name, size_t refs)
|
||||
name_(name),
|
||||
facets_(N)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
facets_ = locale::classic().__locale_->facets_;
|
||||
for (unsigned i = 0; i < facets_.size(); ++i)
|
||||
if (facets_[i])
|
||||
@@ -160,7 +158,6 @@ locale::__imp::__imp(const string& name, size_t refs)
|
||||
install(new time_put_byname<wchar_t>(name_));
|
||||
install(new messages_byname<char>(name_));
|
||||
install(new messages_byname<wchar_t>(name_));
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -169,7 +166,6 @@ locale::__imp::__imp(const string& name, size_t refs)
|
||||
facets_[i]->__release_shared();
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
locale::__imp::__imp(const __imp& other)
|
||||
@@ -190,10 +186,8 @@ locale::__imp::__imp(const __imp& other, const string& name, locale::category c)
|
||||
for (unsigned i = 0; i < facets_.size(); ++i)
|
||||
if (facets_[i])
|
||||
facets_[i]->__add_shared();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (c & locale::collate)
|
||||
{
|
||||
install(new collate_byname<char>(name));
|
||||
@@ -232,7 +226,6 @@ locale::__imp::__imp(const __imp& other, const string& name, locale::category c)
|
||||
install(new messages_byname<char>(name));
|
||||
install(new messages_byname<wchar_t>(name));
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -241,7 +234,6 @@ locale::__imp::__imp(const __imp& other, const string& name, locale::category c)
|
||||
facets_[i]->__release_shared();
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
template<class F>
|
||||
@@ -261,10 +253,8 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c)
|
||||
for (unsigned i = 0; i < facets_.size(); ++i)
|
||||
if (facets_[i])
|
||||
facets_[i]->__add_shared();
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (c & locale::collate)
|
||||
{
|
||||
install_from<_STD::collate<char> >(one);
|
||||
@@ -311,7 +301,6 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c)
|
||||
install_from<_STD::messages<char> >(one);
|
||||
install_from<_STD::messages<wchar_t> >(one);
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -320,7 +309,6 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c)
|
||||
facets_[i]->__release_shared();
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
locale::__imp::__imp(const __imp& other, facet* f, long id)
|
||||
@@ -358,10 +346,8 @@ locale::__imp::install(facet* f, long id)
|
||||
const locale::facet*
|
||||
locale::__imp::use_facet(long id) const
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (!has_facet(id))
|
||||
throw bad_cast();
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return facets_[id];
|
||||
}
|
||||
|
||||
@@ -428,12 +414,8 @@ locale::operator=(const locale& other) throw()
|
||||
}
|
||||
|
||||
locale::locale(const char* name)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
: __locale_(name ? new __imp(name)
|
||||
: throw runtime_error("locale constructed with null"))
|
||||
#else // _LIBCPP_NO_EXCEPTIONS
|
||||
: __locale_(new __imp(name))
|
||||
#endif
|
||||
{
|
||||
__locale_->__add_shared();
|
||||
}
|
||||
@@ -445,12 +427,8 @@ locale::locale(const string& name)
|
||||
}
|
||||
|
||||
locale::locale(const locale& other, const char* name, category c)
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
: __locale_(name ? new __imp(*other.__locale_, name, c)
|
||||
: throw runtime_error("locale constructed with null"))
|
||||
#else // _LIBCPP_NO_EXCEPTIONS
|
||||
: __locale_(new __imp(*other.__locale_, name, c))
|
||||
#endif
|
||||
{
|
||||
__locale_->__add_shared();
|
||||
}
|
||||
@@ -567,22 +545,18 @@ collate_byname<char>::collate_byname(const char* n, size_t refs)
|
||||
: collate<char>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, n, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("collate_byname<char>::collate_byname"
|
||||
" failed to construct for " + string(n));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
collate_byname<char>::collate_byname(const string& name, size_t refs)
|
||||
: collate<char>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, name.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("collate_byname<char>::collate_byname"
|
||||
" failed to construct for " + name);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
collate_byname<char>::~collate_byname()
|
||||
@@ -619,22 +593,18 @@ collate_byname<wchar_t>::collate_byname(const char* n, size_t refs)
|
||||
: collate<wchar_t>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, n, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
|
||||
" failed to construct for " + string(n));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
collate_byname<wchar_t>::collate_byname(const string& name, size_t refs)
|
||||
: collate<wchar_t>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, name.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
|
||||
" failed to construct for " + name);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
collate_byname<wchar_t>::~collate_byname()
|
||||
@@ -858,22 +828,18 @@ ctype_byname<char>::ctype_byname(const char* name, size_t refs)
|
||||
: ctype<char>(0, false, refs),
|
||||
__l(newlocale(LC_ALL_MASK, name, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("ctype_byname<char>::ctype_byname"
|
||||
" failed to construct for " + string(name));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
ctype_byname<char>::ctype_byname(const string& name, size_t refs)
|
||||
: ctype<char>(0, false, refs),
|
||||
__l(newlocale(LC_ALL_MASK, name.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("ctype_byname<char>::ctype_byname"
|
||||
" failed to construct for " + name);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
ctype_byname<char>::~ctype_byname()
|
||||
@@ -915,22 +881,18 @@ ctype_byname<wchar_t>::ctype_byname(const char* name, size_t refs)
|
||||
: ctype<wchar_t>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, name, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
|
||||
" failed to construct for " + string(name));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
ctype_byname<wchar_t>::ctype_byname(const string& name, size_t refs)
|
||||
: ctype<wchar_t>(refs),
|
||||
__l(newlocale(LC_ALL_MASK, name.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
|
||||
" failed to construct for " + name);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
ctype_byname<wchar_t>::~ctype_byname()
|
||||
@@ -1057,15 +1019,15 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch
|
||||
|
||||
// template <> class codecvt<char, char, mbstate_t>
|
||||
|
||||
locale::id codecvt<char, char, mbstate_t>::id;
|
||||
locale::id codecvt<char, char, mbstate_t>::id;
|
||||
|
||||
codecvt<char, char, mbstate_t>::~codecvt()
|
||||
{
|
||||
}
|
||||
|
||||
codecvt<char, char, mbstate_t>::result
|
||||
codecvt<char, char, mbstate_t>::do_out(state_type&,
|
||||
const intern_type* frm, const intern_type*, const intern_type*& frm_nxt,
|
||||
codecvt<char, char, mbstate_t>::do_out(state_type&,
|
||||
const intern_type* frm, const intern_type*, const intern_type*& frm_nxt,
|
||||
extern_type* to, extern_type*, extern_type*& to_nxt) const
|
||||
{
|
||||
frm_nxt = frm;
|
||||
@@ -1074,8 +1036,8 @@ codecvt<char, char, mbstate_t>::do_out(state_type&,
|
||||
}
|
||||
|
||||
codecvt<char, char, mbstate_t>::result
|
||||
codecvt<char, char, mbstate_t>::do_in(state_type&,
|
||||
const extern_type* frm, const extern_type*, const extern_type*& frm_nxt,
|
||||
codecvt<char, char, mbstate_t>::do_in(state_type&,
|
||||
const extern_type* frm, const extern_type*, const extern_type*& frm_nxt,
|
||||
intern_type* to, intern_type*, intern_type*& to_nxt) const
|
||||
{
|
||||
frm_nxt = frm;
|
||||
@@ -1084,7 +1046,7 @@ codecvt<char, char, mbstate_t>::do_in(state_type&,
|
||||
}
|
||||
|
||||
codecvt<char, char, mbstate_t>::result
|
||||
codecvt<char, char, mbstate_t>::do_unshift(state_type&,
|
||||
codecvt<char, char, mbstate_t>::do_unshift(state_type&,
|
||||
extern_type* to, extern_type*, extern_type*& to_nxt) const
|
||||
{
|
||||
to_nxt = to;
|
||||
@@ -1118,7 +1080,7 @@ codecvt<char, char, mbstate_t>::do_max_length() const throw()
|
||||
|
||||
// template <> class codecvt<wchar_t, char, mbstate_t>
|
||||
|
||||
locale::id codecvt<wchar_t, char, mbstate_t>::id;
|
||||
locale::id codecvt<wchar_t, char, mbstate_t>::id;
|
||||
|
||||
codecvt<wchar_t, char, mbstate_t>::codecvt(size_t refs)
|
||||
: locale::facet(refs),
|
||||
@@ -1130,11 +1092,9 @@ codecvt<wchar_t, char, mbstate_t>::codecvt(const char* nm, size_t refs)
|
||||
: locale::facet(refs),
|
||||
__l(newlocale(LC_ALL_MASK, nm, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__l == 0)
|
||||
throw runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
codecvt<wchar_t, char, mbstate_t>::~codecvt()
|
||||
@@ -1145,7 +1105,7 @@ codecvt<wchar_t, char, mbstate_t>::~codecvt()
|
||||
|
||||
codecvt<wchar_t, char, mbstate_t>::result
|
||||
codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
|
||||
{
|
||||
// look for first internal null in frm
|
||||
@@ -1201,7 +1161,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
|
||||
|
||||
codecvt<wchar_t, char, mbstate_t>::result
|
||||
codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
|
||||
{
|
||||
// look for first internal null in frm
|
||||
@@ -2730,7 +2690,7 @@ utf16le_to_ucs2_length(const uint8_t* frm, const uint8_t* frm_end,
|
||||
|
||||
// template <> class codecvt<char16_t, char, mbstate_t>
|
||||
|
||||
locale::id codecvt<char16_t, char, mbstate_t>::id;
|
||||
locale::id codecvt<char16_t, char, mbstate_t>::id;
|
||||
|
||||
codecvt<char16_t, char, mbstate_t>::~codecvt()
|
||||
{
|
||||
@@ -2738,7 +2698,7 @@ codecvt<char16_t, char, mbstate_t>::~codecvt()
|
||||
|
||||
codecvt<char16_t, char, mbstate_t>::result
|
||||
codecvt<char16_t, char, mbstate_t>::do_out(state_type&,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
|
||||
{
|
||||
const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
|
||||
@@ -2755,7 +2715,7 @@ codecvt<char16_t, char, mbstate_t>::do_out(state_type&,
|
||||
|
||||
codecvt<char16_t, char, mbstate_t>::result
|
||||
codecvt<char16_t, char, mbstate_t>::do_in(state_type&,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
|
||||
{
|
||||
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
|
||||
@@ -2807,7 +2767,7 @@ codecvt<char16_t, char, mbstate_t>::do_max_length() const throw()
|
||||
|
||||
// template <> class codecvt<char32_t, char, mbstate_t>
|
||||
|
||||
locale::id codecvt<char32_t, char, mbstate_t>::id;
|
||||
locale::id codecvt<char32_t, char, mbstate_t>::id;
|
||||
|
||||
codecvt<char32_t, char, mbstate_t>::~codecvt()
|
||||
{
|
||||
@@ -2815,7 +2775,7 @@ codecvt<char32_t, char, mbstate_t>::~codecvt()
|
||||
|
||||
codecvt<char32_t, char, mbstate_t>::result
|
||||
codecvt<char32_t, char, mbstate_t>::do_out(state_type&,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
|
||||
extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
|
||||
{
|
||||
const uint32_t* _frm = reinterpret_cast<const uint32_t*>(frm);
|
||||
@@ -2832,7 +2792,7 @@ codecvt<char32_t, char, mbstate_t>::do_out(state_type&,
|
||||
|
||||
codecvt<char32_t, char, mbstate_t>::result
|
||||
codecvt<char32_t, char, mbstate_t>::do_in(state_type&,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
|
||||
intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
|
||||
{
|
||||
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
|
||||
@@ -3872,11 +3832,9 @@ numpunct_byname<char>::__init(const char* nm)
|
||||
if (strcmp(nm, "C") != 0)
|
||||
{
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("numpunct_byname<char>::numpunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->decimal_point)
|
||||
__decimal_point_ = *lc->decimal_point;
|
||||
@@ -3911,11 +3869,9 @@ numpunct_byname<wchar_t>::__init(const char* nm)
|
||||
if (strcmp(nm, "C") != 0)
|
||||
{
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("numpunct_byname<char>::numpunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->decimal_point)
|
||||
__decimal_point_ = *lc->decimal_point;
|
||||
@@ -4318,21 +4274,17 @@ __time_get_c_storage<wchar_t>::__r() const
|
||||
__time_get::__time_get(const char* nm)
|
||||
: __loc_(newlocale(LC_ALL_MASK, nm, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__loc_ == 0)
|
||||
throw runtime_error("time_get_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
__time_get::__time_get(const string& nm)
|
||||
: __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__loc_ == 0)
|
||||
throw runtime_error("time_get_byname"
|
||||
" failed to construct for " + nm);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
__time_get::~__time_get()
|
||||
@@ -4969,21 +4921,17 @@ __time_get_storage<wchar_t>::__do_date_order() const
|
||||
__time_put::__time_put(const char* nm)
|
||||
: __loc_(newlocale(LC_ALL_MASK, nm, 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__loc_ == 0)
|
||||
throw runtime_error("time_put_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
__time_put::__time_put(const string& nm)
|
||||
: __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0))
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__loc_ == 0)
|
||||
throw runtime_error("time_put_byname"
|
||||
" failed to construct for " + nm);
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
__time_put::~__time_put()
|
||||
@@ -5262,11 +5210,9 @@ moneypunct_byname<char, false>::init(const char* nm)
|
||||
{
|
||||
typedef moneypunct<char, false> base;
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("moneypunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->mon_decimal_point)
|
||||
__decimal_point_ = *lc->mon_decimal_point;
|
||||
@@ -5300,11 +5246,9 @@ moneypunct_byname<char, true>::init(const char* nm)
|
||||
{
|
||||
typedef moneypunct<char, true> base;
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("moneypunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->mon_decimal_point)
|
||||
__decimal_point_ = *lc->mon_decimal_point;
|
||||
@@ -5338,11 +5282,9 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
|
||||
{
|
||||
typedef moneypunct<wchar_t, false> base;
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("moneypunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->mon_decimal_point)
|
||||
__decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
|
||||
@@ -5399,11 +5341,9 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
|
||||
{
|
||||
typedef moneypunct<wchar_t, true> base;
|
||||
unique_ptr<_xlocale, int(*)(locale_t)> loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (loc == 0)
|
||||
throw runtime_error("moneypunct_byname"
|
||||
" failed to construct for " + string(nm));
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
lconv* lc = localeconv_l(loc.get());
|
||||
if (*lc->mon_decimal_point)
|
||||
__decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
|
||||
@@ -5458,9 +5398,7 @@ void __do_nothing(void*) {}
|
||||
|
||||
void __throw_runtime_error(const char* msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw runtime_error(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
template class collate<char>;
|
||||
@@ -5526,4 +5464,4 @@ template class codecvt_byname<char32_t, char, mbstate_t>;
|
||||
template class __vector_base_common<true>;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
#endif // __APPLE__
|
||||
#endif /* __APPLE__ */
|
||||
|
@@ -30,6 +30,7 @@ decrement(T& t)
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
const allocator_arg_t allocator_arg = allocator_arg_t();
|
||||
|
||||
bad_weak_ptr::~bad_weak_ptr() throw() {}
|
||||
@@ -106,16 +107,12 @@ __shared_weak_count::lock()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_NO_RTTI
|
||||
|
||||
const void*
|
||||
__shared_weak_count::__get_deleter(const type_info&) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_NO_RTTI
|
||||
|
||||
void
|
||||
declare_reachable(void*)
|
||||
{
|
||||
|
@@ -220,10 +220,8 @@ __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
|
||||
pthread_cond_wait(&cv, &mut);
|
||||
if (flag == 0)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
flag = 1;
|
||||
pthread_mutex_unlock(&mut);
|
||||
func(arg);
|
||||
@@ -231,7 +229,6 @@ __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
|
||||
flag = ~0ul;
|
||||
pthread_mutex_unlock(&mut);
|
||||
pthread_cond_broadcast(&cv);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -241,7 +238,6 @@ __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
|
||||
pthread_cond_broadcast(&cv);
|
||||
throw;
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
else
|
||||
pthread_mutex_unlock(&mut);
|
||||
|
44
src/new.cpp
44
src/new.cpp
@@ -11,20 +11,23 @@
|
||||
|
||||
#include "new"
|
||||
|
||||
|
||||
#if __APPLE__
|
||||
#include <cxxabi.h>
|
||||
#include <cxxabi.h>
|
||||
// On Darwin, there are two STL shared libraries and a lower level ABI
|
||||
// shared libray. The global holding the current new handler is
|
||||
// shared libray. The global holding the current new handler is
|
||||
// in the ABI library and named __cxa_new_handler.
|
||||
#define __new_handler __cxxabiapple::__cxa_new_handler
|
||||
#else // __APPLE__
|
||||
static std::new_handler __new_handler;
|
||||
#else
|
||||
static std::new_handler __new_handler;
|
||||
#endif
|
||||
|
||||
|
||||
// Implement all new and delete operators as weak definitions
|
||||
// in this shared library, so that they can be overriden by programs
|
||||
// that define non-weak copies of the functions.
|
||||
|
||||
|
||||
__attribute__((__weak__, __visibility__("default")))
|
||||
void *
|
||||
operator new(std::size_t size) throw (std::bad_alloc)
|
||||
@@ -34,16 +37,12 @@ operator new(std::size_t size) throw (std::bad_alloc)
|
||||
void* p;
|
||||
while ((p = ::malloc(size)) == 0)
|
||||
{
|
||||
// If malloc fails and there is a new_handler,
|
||||
// call it to try free up memory.
|
||||
// If malloc fails and there is a new_handler,
|
||||
// call it to try free up memory.
|
||||
if (__new_handler)
|
||||
__new_handler();
|
||||
else
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw std::bad_alloc();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return p;
|
||||
}
|
||||
@@ -53,17 +52,13 @@ void*
|
||||
operator new(size_t size, const std::nothrow_t&) throw()
|
||||
{
|
||||
void* p = 0;
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
p = ::operator new(size);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -79,17 +74,13 @@ void*
|
||||
operator new[](size_t size, const std::nothrow_t& nothrow) throw()
|
||||
{
|
||||
void* p = 0;
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
p = ::operator new[](size);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -108,6 +99,7 @@ operator delete(void* ptr, const std::nothrow_t&) throw ()
|
||||
::operator delete(ptr);
|
||||
}
|
||||
|
||||
|
||||
__attribute__((__weak__, __visibility__("default")))
|
||||
void
|
||||
operator delete[] (void* ptr) throw ()
|
||||
@@ -122,6 +114,7 @@ operator delete[] (void* ptr, const std::nothrow_t&) throw ()
|
||||
::operator delete[](ptr);
|
||||
}
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@@ -135,20 +128,21 @@ set_new_handler(new_handler handler) throw()
|
||||
return r;
|
||||
}
|
||||
|
||||
bad_alloc::bad_alloc() throw()
|
||||
{
|
||||
bad_alloc::bad_alloc() throw()
|
||||
{
|
||||
}
|
||||
|
||||
bad_alloc::~bad_alloc() throw()
|
||||
{
|
||||
bad_alloc::~bad_alloc() throw()
|
||||
{
|
||||
}
|
||||
|
||||
const char*
|
||||
const char*
|
||||
bad_alloc::what() const throw()
|
||||
{
|
||||
return "std::bad_alloc";
|
||||
}
|
||||
|
||||
|
||||
bad_array_new_length::bad_array_new_length() throw()
|
||||
{
|
||||
}
|
||||
@@ -163,12 +157,12 @@ bad_array_new_length::what() const throw()
|
||||
return "bad_array_new_length";
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
__throw_bad_alloc()
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw bad_alloc();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // std
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
random_device::random_device(const string& __token)
|
||||
|
@@ -50,10 +50,6 @@ make_error_type_string(regex_constants::error_type ecode)
|
||||
case regex_constants::error_stack:
|
||||
return "There was insufficient memory to determine whether the regular "
|
||||
"expression could match the specified character sequence.";
|
||||
case regex_constants::__re_err_grammar:
|
||||
return "An invalid regex grammar has been requested.";
|
||||
case regex_constants::__re_err_empty:
|
||||
return "An empty regex is not allowed in the POSIX grammar.";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -256,60 +252,4 @@ __get_classname(const char* s, bool __icase)
|
||||
return r;
|
||||
}
|
||||
|
||||
template <>
|
||||
void
|
||||
__match_any_but_newline<char>::__exec(__state& __s) const
|
||||
{
|
||||
if (__s.__current_ != __s.__last_)
|
||||
{
|
||||
switch (*__s.__current_)
|
||||
{
|
||||
case '\r':
|
||||
case '\n':
|
||||
__s.__do_ = __state::__reject;
|
||||
__s.__node_ = nullptr;
|
||||
break;
|
||||
default:
|
||||
__s.__do_ = __state::__accept_and_consume;
|
||||
++__s.__current_;
|
||||
__s.__node_ = this->first();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__s.__do_ = __state::__reject;
|
||||
__s.__node_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
void
|
||||
__match_any_but_newline<wchar_t>::__exec(__state& __s) const
|
||||
{
|
||||
if (__s.__current_ != __s.__last_)
|
||||
{
|
||||
switch (*__s.__current_)
|
||||
{
|
||||
case '\r':
|
||||
case '\n':
|
||||
case 0x2028:
|
||||
case 0x2029:
|
||||
__s.__do_ = __state::__reject;
|
||||
__s.__node_ = nullptr;
|
||||
break;
|
||||
default:
|
||||
__s.__do_ = __state::__accept_and_consume;
|
||||
++__s.__current_;
|
||||
__s.__node_ = this->first();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__s.__do_ = __state::__reject;
|
||||
__s.__node_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -81,7 +81,7 @@ __libcpp_nmstr::~__libcpp_nmstr()
|
||||
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
||||
#pragma GCC visiblity pop
|
||||
|
||||
namespace std // purposefully not using versioning namespace
|
||||
{
|
||||
|
@@ -79,11 +79,9 @@ stoi(const string& str, size_t* idx, int base)
|
||||
ptr = const_cast<char*>(p);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoi: no conversion");
|
||||
throw out_of_range("stoi: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -100,11 +98,9 @@ stoi(const wstring& str, size_t* idx, int base)
|
||||
ptr = const_cast<wchar_t*>(p);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoi: no conversion");
|
||||
throw out_of_range("stoi: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -119,11 +115,9 @@ stol(const string& str, size_t* idx, int base)
|
||||
long r = strtol(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stol: no conversion");
|
||||
throw out_of_range("stol: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -138,11 +132,9 @@ stol(const wstring& str, size_t* idx, int base)
|
||||
long r = wcstol(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stol: no conversion");
|
||||
throw out_of_range("stol: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -157,11 +149,9 @@ stoul(const string& str, size_t* idx, int base)
|
||||
unsigned long r = strtoul(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoul: no conversion");
|
||||
throw out_of_range("stoul: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -176,11 +166,9 @@ stoul(const wstring& str, size_t* idx, int base)
|
||||
unsigned long r = wcstoul(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoul: no conversion");
|
||||
throw out_of_range("stoul: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -195,11 +183,9 @@ stoll(const string& str, size_t* idx, int base)
|
||||
long long r = strtoll(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoll: no conversion");
|
||||
throw out_of_range("stoll: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -214,11 +200,9 @@ stoll(const wstring& str, size_t* idx, int base)
|
||||
long long r = wcstoll(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoll: no conversion");
|
||||
throw out_of_range("stoll: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -233,11 +217,9 @@ stoull(const string& str, size_t* idx, int base)
|
||||
unsigned long long r = strtoull(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoull: no conversion");
|
||||
throw out_of_range("stoull: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -252,11 +234,9 @@ stoull(const wstring& str, size_t* idx, int base)
|
||||
unsigned long long r = wcstoull(p, &ptr, base);
|
||||
if (ptr == p)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (r == 0)
|
||||
throw invalid_argument("stoull: no conversion");
|
||||
throw out_of_range("stoull: out of range");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
@@ -272,12 +252,10 @@ stof(const string& str, size_t* idx)
|
||||
errno = 0;
|
||||
double r = strtod(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stof: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stof: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return static_cast<float>(r);
|
||||
@@ -292,12 +270,10 @@ stof(const wstring& str, size_t* idx)
|
||||
errno = 0;
|
||||
double r = wcstod(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stof: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stof: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return static_cast<float>(r);
|
||||
@@ -312,12 +288,10 @@ stod(const string& str, size_t* idx)
|
||||
errno = 0;
|
||||
double r = strtod(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stod: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stod: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return r;
|
||||
@@ -332,12 +306,10 @@ stod(const wstring& str, size_t* idx)
|
||||
errno = 0;
|
||||
double r = wcstod(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stod: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stod: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return r;
|
||||
@@ -352,12 +324,10 @@ stold(const string& str, size_t* idx)
|
||||
errno = 0;
|
||||
long double r = strtold(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stold: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stold: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return r;
|
||||
@@ -372,12 +342,10 @@ stold(const wstring& str, size_t* idx)
|
||||
errno = 0;
|
||||
long double r = wcstold(p, &ptr);
|
||||
swap(errno, errno_save);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (errno_save == ERANGE)
|
||||
throw out_of_range("stold: out of range");
|
||||
if (ptr == p)
|
||||
throw invalid_argument("stold: no conversion");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
if (idx)
|
||||
*idx = static_cast<size_t>(ptr - p);
|
||||
return r;
|
||||
|
@@ -100,7 +100,7 @@ strstreambuf::strstreambuf(const unsigned char* __gnext, streamsize __n)
|
||||
__init((char*)__gnext, __n, nullptr);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
strstreambuf::strstreambuf(strstreambuf&& __rhs)
|
||||
: streambuf(__rhs),
|
||||
@@ -132,7 +132,7 @@ strstreambuf::operator=(strstreambuf&& __rhs)
|
||||
__rhs.setp(nullptr, nullptr);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
strstreambuf::~strstreambuf()
|
||||
{
|
||||
@@ -257,6 +257,7 @@ strstreambuf::underflow()
|
||||
return int_type((unsigned char)*gptr());
|
||||
}
|
||||
|
||||
|
||||
strstreambuf::pos_type
|
||||
strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which)
|
||||
{
|
||||
@@ -315,6 +316,7 @@ strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmod
|
||||
return pos_type(__p);
|
||||
}
|
||||
|
||||
|
||||
strstreambuf::pos_type
|
||||
strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
|
||||
{
|
||||
|
@@ -67,7 +67,7 @@ __generic_error_category::message(int ev) const
|
||||
#ifdef ELAST
|
||||
if (ev > ELAST)
|
||||
return string("unspecified generic_category error");
|
||||
#endif // ELAST
|
||||
#endif
|
||||
return __do_message::message(ev);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ __system_error_category::message(int ev) const
|
||||
#ifdef ELAST
|
||||
if (ev > ELAST)
|
||||
return string("unspecified system_category error");
|
||||
#endif // ELAST
|
||||
#endif
|
||||
return __do_message::message(ev);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ __system_error_category::default_error_condition(int ev) const
|
||||
#ifdef ELAST
|
||||
if (ev > ELAST)
|
||||
return error_condition(ev, system_category());
|
||||
#endif // ELAST
|
||||
#endif
|
||||
return error_condition(ev, generic_category());
|
||||
}
|
||||
|
||||
@@ -193,9 +193,7 @@ system_error::~system_error() throw()
|
||||
void
|
||||
__throw_system_error(int ev, const char* what_arg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw system_error(error_code(ev, system_category()), what_arg);
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -9,8 +9,6 @@
|
||||
|
||||
#include "thread"
|
||||
#include "exception"
|
||||
#include "vector"
|
||||
#include "future"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -26,10 +24,8 @@ void
|
||||
thread::join()
|
||||
{
|
||||
int ec = pthread_join(__t_, 0);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (ec)
|
||||
throw system_error(error_code(ec, system_category()), "thread::join failed");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
__t_ = 0;
|
||||
}
|
||||
|
||||
@@ -43,10 +39,8 @@ thread::detach()
|
||||
if (ec == 0)
|
||||
__t_ = 0;
|
||||
}
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (ec)
|
||||
throw system_error(error_code(ec, system_category()), "thread::detach failed");
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
unsigned
|
||||
@@ -58,11 +52,11 @@ thread::hardware_concurrency()
|
||||
std::size_t s = sizeof(n);
|
||||
sysctl(mib, 2, &n, &s, 0, 0);
|
||||
return n;
|
||||
#else // defined(CTL_HW) && defined(HW_NCPU)
|
||||
#else // !defined(CTL_HW && HW_NCPU)
|
||||
// TODO: grovel through /proc or check cpuid on x86 and similar
|
||||
// instructions on other architectures.
|
||||
return 0; // Means not computable [thread.thread.static]
|
||||
#endif // defined(CTL_HW) && defined(HW_NCPU)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace this_thread
|
||||
@@ -83,79 +77,4 @@ sleep_for(const chrono::nanoseconds& ns)
|
||||
|
||||
} // this_thread
|
||||
|
||||
__thread_specific_ptr<__thread_struct> __thread_local_data;
|
||||
|
||||
// __thread_struct_imp
|
||||
|
||||
class __thread_struct_imp
|
||||
{
|
||||
typedef vector<__assoc_sub_state*> _AsyncStates;
|
||||
typedef vector<pair<condition_variable*, mutex*> > _Notify;
|
||||
|
||||
_AsyncStates async_states_;
|
||||
_Notify notify_;
|
||||
|
||||
__thread_struct_imp(const __thread_struct_imp&);
|
||||
__thread_struct_imp& operator=(const __thread_struct_imp&);
|
||||
public:
|
||||
__thread_struct_imp() {}
|
||||
~__thread_struct_imp();
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable* cv, mutex* m);
|
||||
void __make_ready_at_thread_exit(__assoc_sub_state* __s);
|
||||
};
|
||||
|
||||
__thread_struct_imp::~__thread_struct_imp()
|
||||
{
|
||||
for (_Notify::iterator i = notify_.begin(), e = notify_.end();
|
||||
i != e; ++i)
|
||||
{
|
||||
i->second->unlock();
|
||||
i->first->notify_all();
|
||||
}
|
||||
for (_AsyncStates::iterator i = async_states_.begin(), e = async_states_.end();
|
||||
i != e; ++i)
|
||||
{
|
||||
(*i)->__make_ready();
|
||||
(*i)->__release_shared();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct_imp::notify_all_at_thread_exit(condition_variable* cv, mutex* m)
|
||||
{
|
||||
notify_.push_back(pair<condition_variable*, mutex*>(cv, m));
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct_imp::__make_ready_at_thread_exit(__assoc_sub_state* __s)
|
||||
{
|
||||
async_states_.push_back(__s);
|
||||
__s->__add_shared();
|
||||
}
|
||||
|
||||
// __thread_struct
|
||||
|
||||
__thread_struct::__thread_struct()
|
||||
: __p_(new __thread_struct_imp)
|
||||
{
|
||||
}
|
||||
|
||||
__thread_struct::~__thread_struct()
|
||||
{
|
||||
delete __p_;
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct::notify_all_at_thread_exit(condition_variable* cv, mutex* m)
|
||||
{
|
||||
__p_->notify_all_at_thread_exit(cv, m);
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct::__make_ready_at_thread_exit(__assoc_sub_state* __s)
|
||||
{
|
||||
__p_->__make_ready_at_thread_exit(__s);
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -7,42 +7,35 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include <stdlib.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
#include "typeinfo"
|
||||
|
||||
std::bad_cast::bad_cast() throw()
|
||||
{
|
||||
std::bad_cast::bad_cast() throw()
|
||||
{
|
||||
}
|
||||
|
||||
std::bad_cast::~bad_cast() throw()
|
||||
{
|
||||
std::bad_cast::~bad_cast() throw()
|
||||
{
|
||||
}
|
||||
|
||||
const char*
|
||||
const char*
|
||||
std::bad_cast::what() const throw()
|
||||
{
|
||||
return "std::bad_cast";
|
||||
}
|
||||
|
||||
std::bad_typeid::bad_typeid() throw()
|
||||
|
||||
std::bad_typeid::bad_typeid() throw()
|
||||
{
|
||||
}
|
||||
|
||||
std::bad_typeid::~bad_typeid() throw()
|
||||
{
|
||||
}
|
||||
|
||||
std::bad_typeid::~bad_typeid() throw()
|
||||
{
|
||||
}
|
||||
|
||||
const char*
|
||||
const char*
|
||||
std::bad_typeid::what() const throw()
|
||||
{
|
||||
return "std::bad_typeid";
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
|
||||
// because bad_cast and bad_typeid are defined in his higher level library
|
||||
void __cxxabiv1::__cxa_bad_typeid() { throw std::bad_typeid(); }
|
||||
void __cxxabiv1::__cxa_bad_cast() { throw std::bad_cast(); }
|
||||
#endif
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
// <algorithm>
|
||||
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter>
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter>
|
||||
// OutIter
|
||||
// copy(InIter first, InIter last, OutIter result);
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
|
||||
// <algorithm>
|
||||
|
||||
// template<BidirectionalIterator InIter, BidirectionalIterator OutIter>
|
||||
// requires OutputIterator<OutIter, InIter::reference>
|
||||
// template<BidirectionalIterator InIter, BidirectionalIterator OutIter>
|
||||
// requires OutputIterator<OutIter, InIter::reference>
|
||||
// OutIter
|
||||
// copy_backward(InIter first, InIter last, OutIter result);
|
||||
|
||||
|
@@ -9,9 +9,9 @@
|
||||
|
||||
// <algorithm>
|
||||
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter,
|
||||
// Predicate<auto, InIter::value_type> Pred>
|
||||
// requires CopyConstructible<Pred>
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter,
|
||||
// Predicate<auto, InIter::value_type> Pred>
|
||||
// requires CopyConstructible<Pred>
|
||||
// OutIter
|
||||
// copy_if(InIter first, InIter last, OutIter result, Pred pred);
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
// <algorithm>
|
||||
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter>
|
||||
// template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter>
|
||||
// OutIter
|
||||
// copy_n(InIter first, InIter::difference_type n, OutIter result);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user