mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-24 04:19:48 +00:00
visibility-decoration.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
333f50d30c
commit
422a53fd7a
@ -592,7 +592,7 @@ template <size_t _Size> class bitset;
|
||||
template <size_t _Size> struct hash<bitset<_Size> >;
|
||||
|
||||
template <size_t _Size>
|
||||
class bitset
|
||||
class _LIBCPP_VISIBLE bitset
|
||||
: private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
|
||||
{
|
||||
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
|
||||
@ -656,6 +656,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t __hash_code() const {return base::__hash_code();}
|
||||
|
||||
friend struct hash<bitset>;
|
||||
@ -1010,9 +1011,10 @@ operator^(const bitset<_Size>& __x, const bitset<_Size>& __y)
|
||||
}
|
||||
|
||||
template <size_t _Size>
|
||||
struct hash<bitset<_Size> >
|
||||
struct _LIBCPP_VISIBLE hash<bitset<_Size> >
|
||||
: public unary_function<bitset<_Size>, size_t>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t operator()(const bitset<_Size>& __bs) const
|
||||
{return __bs.__hash_code();}
|
||||
};
|
||||
|
@ -262,7 +262,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
template <class _Rep, class _Period = ratio<1> > class duration;
|
||||
template <class _Rep, class _Period = ratio<1> > class _LIBCPP_VISIBLE duration;
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_duration : false_type {};
|
||||
@ -282,7 +282,8 @@ struct __is_duration<const volatile duration<_Rep, _Period> > : true_type {};
|
||||
} // chrono
|
||||
|
||||
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
|
||||
struct common_type<chrono::duration<_Rep1, _Period1>, chrono::duration<_Rep2, _Period2> >
|
||||
struct _LIBCPP_VISIBLE common_type<chrono::duration<_Rep1, _Period1>,
|
||||
chrono::duration<_Rep2, _Period2> >
|
||||
{
|
||||
typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
|
||||
typename __ratio_gcd<_Period1, _Period2>::type> type;
|
||||
@ -357,10 +358,11 @@ duration_cast(const duration<_Rep, _Period>& __fd)
|
||||
return __duration_cast<duration<_Rep, _Period>, _ToDuration>()(__fd);
|
||||
}
|
||||
|
||||
template <class _Rep> struct treat_as_floating_point : is_floating_point<_Rep> {};
|
||||
template <class _Rep>
|
||||
struct _LIBCPP_VISIBLE treat_as_floating_point : is_floating_point<_Rep> {};
|
||||
|
||||
template <class _Rep>
|
||||
struct duration_values
|
||||
struct _LIBCPP_VISIBLE duration_values
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY static _Rep zero() {return _Rep(0);}
|
||||
@ -371,7 +373,7 @@ public:
|
||||
// duration
|
||||
|
||||
template <class _Rep, class _Period>
|
||||
class duration
|
||||
class _LIBCPP_VISIBLE duration
|
||||
{
|
||||
static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration");
|
||||
static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio");
|
||||
@ -667,7 +669,7 @@ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
template <class _Clock, class _Duration = typename _Clock::duration>
|
||||
class time_point
|
||||
class _LIBCPP_VISIBLE time_point
|
||||
{
|
||||
static_assert(__is_duration<_Duration>::value,
|
||||
"Second template parameter of time_point must be a std::chrono::duration");
|
||||
@ -711,7 +713,8 @@ public:
|
||||
} // chrono
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
struct common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _Duration2> >
|
||||
struct _LIBCPP_VISIBLE common_type<chrono::time_point<_Clock, _Duration1>,
|
||||
chrono::time_point<_Clock, _Duration2> >
|
||||
{
|
||||
typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
|
||||
};
|
||||
@ -833,7 +836,7 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
||||
/////////////////////// clocks ///////////////////////////
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
class system_clock
|
||||
class _LIBCPP_VISIBLE system_clock
|
||||
{
|
||||
public:
|
||||
typedef microseconds duration;
|
||||
@ -847,7 +850,7 @@ public:
|
||||
static time_point from_time_t(time_t __t);
|
||||
};
|
||||
|
||||
class monotonic_clock
|
||||
class _LIBCPP_VISIBLE monotonic_clock
|
||||
{
|
||||
public:
|
||||
typedef nanoseconds duration;
|
||||
|
141
include/cmath
141
include/cmath
@ -317,7 +317,7 @@ using ::double_t;
|
||||
// abs
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, _A1>::type
|
||||
abs(_A1 __x) {return fabs(__x);}
|
||||
|
||||
@ -330,7 +330,7 @@ inline _LIBCPP_INLINE_VISIBILITY float acos(float __x) {return acosf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __x) {return acosl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
acos(_A1 __x) {return acos((double)__x);}
|
||||
|
||||
@ -343,7 +343,7 @@ inline _LIBCPP_INLINE_VISIBILITY float asin(float __x) {return asinf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __x) {return asinl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
asin(_A1 __x) {return asin((double)__x);}
|
||||
|
||||
@ -356,7 +356,7 @@ inline _LIBCPP_INLINE_VISIBILITY float atan(float __x) {return atanf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __x) {return atanl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
atan(_A1 __x) {return atan((double)__x);}
|
||||
|
||||
@ -369,7 +369,7 @@ inline _LIBCPP_INLINE_VISIBILITY float atan2(float __y, float __x)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __y, long double __x) {return atan2l(__y, __x);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -393,7 +393,7 @@ inline _LIBCPP_INLINE_VISIBILITY float ceil(float __x) {return ceilf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __x) {return ceill(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
ceil(_A1 __x) {return ceil((double)__x);}
|
||||
|
||||
@ -406,7 +406,7 @@ inline _LIBCPP_INLINE_VISIBILITY float cos(float __x) {return cosf(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __x) {return cosl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
cos(_A1 __x) {return cos((double)__x);}
|
||||
|
||||
@ -419,7 +419,7 @@ inline _LIBCPP_INLINE_VISIBILITY float cosh(float __x) {return coshf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __x) {return coshl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
cosh(_A1 __x) {return cosh((double)__x);}
|
||||
|
||||
@ -432,7 +432,7 @@ inline _LIBCPP_INLINE_VISIBILITY float exp(float __x) {return expf(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __x) {return expl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
exp(_A1 __x) {return exp((double)__x);}
|
||||
|
||||
@ -445,7 +445,7 @@ inline _LIBCPP_INLINE_VISIBILITY float fabs(float __x) {return fabsf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __x) {return fabsl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
fabs(_A1 __x) {return fabs((double)__x);}
|
||||
|
||||
@ -458,7 +458,7 @@ inline _LIBCPP_INLINE_VISIBILITY float floor(float __x) {return floo
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __x) {return floorl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
floor(_A1 __x) {return floor((double)__x);}
|
||||
|
||||
@ -471,7 +471,7 @@ inline _LIBCPP_INLINE_VISIBILITY float fmod(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __x, long double __y) {return fmodl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -495,7 +495,7 @@ inline _LIBCPP_INLINE_VISIBILITY float frexp(float __x, int* __e) {r
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __x, int* __e) {return frexpl(__x, __e);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
frexp(_A1 __x, int* __e) {return frexp((double)__x, __e);}
|
||||
|
||||
@ -508,7 +508,7 @@ inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __x, int __e) {re
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __x, int __e) {return ldexpl(__x, __e);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
ldexp(_A1 __x, int __e) {return ldexp((double)__x, __e);}
|
||||
|
||||
@ -521,7 +521,7 @@ inline _LIBCPP_INLINE_VISIBILITY float log(float __x) {return logf(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double log(long double __x) {return logl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
log(_A1 __x) {return log((double)__x);}
|
||||
|
||||
@ -534,7 +534,7 @@ inline _LIBCPP_INLINE_VISIBILITY float log10(float __x) {return log1
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __x) {return log10l(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
log10(_A1 __x) {return log10((double)__x);}
|
||||
|
||||
@ -555,7 +555,7 @@ inline _LIBCPP_INLINE_VISIBILITY float pow(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __x, long double __y) {return powl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -579,7 +579,7 @@ inline _LIBCPP_INLINE_VISIBILITY float sin(float __x) {return sinf(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __x) {return sinl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
sin(_A1 __x) {return sin((double)__x);}
|
||||
|
||||
@ -592,7 +592,7 @@ inline _LIBCPP_INLINE_VISIBILITY float sinh(float __x) {return sinhf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __x) {return sinhl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
sinh(_A1 __x) {return sinh((double)__x);}
|
||||
|
||||
@ -605,7 +605,7 @@ inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __x) {return sqrtf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __x) {return sqrtl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
sqrt(_A1 __x) {return sqrt((double)__x);}
|
||||
|
||||
@ -618,7 +618,7 @@ inline _LIBCPP_INLINE_VISIBILITY float tan(float __x) {return tanf(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __x) {return tanl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
tan(_A1 __x) {return tan((double)__x);}
|
||||
|
||||
@ -631,7 +631,7 @@ inline _LIBCPP_INLINE_VISIBILITY float tanh(float __x) {return tanhf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __x) {return tanhl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
tanh(_A1 __x) {return tanh((double)__x);}
|
||||
|
||||
@ -652,7 +652,7 @@ __libcpp_signbit(_A1 __x)
|
||||
#undef signbit
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, bool>::type
|
||||
signbit(_A1 __x)
|
||||
{
|
||||
@ -678,7 +678,7 @@ __libcpp_fpclassify(_A1 __x)
|
||||
#undef fpclassify
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, int>::type
|
||||
fpclassify(_A1 __x)
|
||||
{
|
||||
@ -704,7 +704,7 @@ __libcpp_isfinite(_A1 __x)
|
||||
#undef isfinite
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, bool>::type
|
||||
isfinite(_A1 __x)
|
||||
{
|
||||
@ -730,7 +730,7 @@ __libcpp_isinf(_A1 __x)
|
||||
#undef isinf
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, bool>::type
|
||||
isinf(_A1 __x)
|
||||
{
|
||||
@ -756,7 +756,7 @@ __libcpp_isnan(_A1 __x)
|
||||
#undef isnan
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, bool>::type
|
||||
isnan(_A1 __x)
|
||||
{
|
||||
@ -782,7 +782,7 @@ __libcpp_isnormal(_A1 __x)
|
||||
#undef isnormal
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, bool>::type
|
||||
isnormal(_A1 __x)
|
||||
{
|
||||
@ -808,7 +808,7 @@ __libcpp_isgreater(_A1 __x, _A2 __y)
|
||||
#undef isgreater
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -839,7 +839,7 @@ __libcpp_isgreaterequal(_A1 __x, _A2 __y)
|
||||
#undef isgreaterequal
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -870,7 +870,7 @@ __libcpp_isless(_A1 __x, _A2 __y)
|
||||
#undef isless
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -901,7 +901,7 @@ __libcpp_islessequal(_A1 __x, _A2 __y)
|
||||
#undef islessequal
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -932,7 +932,7 @@ __libcpp_islessgreater(_A1 __x, _A2 __y)
|
||||
#undef islessgreater
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -963,7 +963,7 @@ __libcpp_isunordered(_A1 __x, _A2 __y)
|
||||
#undef isunordered
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_floating_point<_A1>::value &&
|
||||
@ -986,7 +986,7 @@ inline _LIBCPP_INLINE_VISIBILITY float acosh(float __x) {return acos
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __x) {return acoshl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
acosh(_A1 __x) {return acosh((double)__x);}
|
||||
|
||||
@ -999,7 +999,7 @@ inline _LIBCPP_INLINE_VISIBILITY float asinh(float __x) {return asin
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __x) {return asinhl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
asinh(_A1 __x) {return asinh((double)__x);}
|
||||
|
||||
@ -1012,7 +1012,7 @@ inline _LIBCPP_INLINE_VISIBILITY float atanh(float __x) {return atan
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __x) {return atanhl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
atanh(_A1 __x) {return atanh((double)__x);}
|
||||
|
||||
@ -1025,7 +1025,7 @@ inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __x) {return cbrtf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __x) {return cbrtl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
cbrt(_A1 __x) {return cbrt((double)__x);}
|
||||
|
||||
@ -1038,7 +1038,7 @@ inline _LIBCPP_INLINE_VISIBILITY float copysign(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double copysign(long double __x, long double __y) {return copysignl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1062,7 +1062,7 @@ inline _LIBCPP_INLINE_VISIBILITY float erf(float __x) {return erff(_
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __x) {return erfl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
erf(_A1 __x) {return erf((double)__x);}
|
||||
|
||||
@ -1075,7 +1075,7 @@ inline _LIBCPP_INLINE_VISIBILITY float erfc(float __x) {return erfcf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __x) {return erfcl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
erfc(_A1 __x) {return erfc((double)__x);}
|
||||
|
||||
@ -1088,7 +1088,7 @@ inline _LIBCPP_INLINE_VISIBILITY float exp2(float __x) {return exp2f
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __x) {return exp2l(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
exp2(_A1 __x) {return exp2((double)__x);}
|
||||
|
||||
@ -1101,7 +1101,7 @@ inline _LIBCPP_INLINE_VISIBILITY float expm1(float __x) {return expm
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __x) {return expm1l(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
expm1(_A1 __x) {return expm1((double)__x);}
|
||||
|
||||
@ -1114,7 +1114,7 @@ inline _LIBCPP_INLINE_VISIBILITY float fdim(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __x, long double __y) {return fdiml(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1134,18 +1134,13 @@ fdim(_A1 __x, _A2 __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY float fmaf(float __x, float __y, float __z) {return (float)((double)__x*__y + __z);}
|
||||
#define FP_FAST_FMAF
|
||||
|
||||
//#if (defined(__ppc__) || defined(__ppc64__))
|
||||
//inline _LIBCPP_INLINE_VISIBILITY double fma(register double __x, register double __y, register double __z) {asm {fmadd __x, __x, __y, __z} return __x;}
|
||||
//#define FP_FAST_FMA
|
||||
//#else
|
||||
using ::fma;
|
||||
//#endif
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY float fma(float __x, float __y, float __z) {return fmaf(__x, __y, __z);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __x, long double __y, long double __z) {return fmal(__x, __y, __z);}
|
||||
|
||||
template <class _A1, class _A2, class _A3>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1171,7 +1166,7 @@ inline _LIBCPP_INLINE_VISIBILITY float fmax(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __x, long double __y) {return fmaxl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1195,7 +1190,7 @@ inline _LIBCPP_INLINE_VISIBILITY float fmin(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __x, long double __y) {return fminl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1219,7 +1214,7 @@ inline _LIBCPP_INLINE_VISIBILITY float hypot(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __x, long double __y) {return hypotl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1243,7 +1238,7 @@ inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __x) {return ilogbf(__x);
|
||||
inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __x) {return ilogbl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, int>::type
|
||||
ilogb(_A1 __x) {return ilogb((double)__x);}
|
||||
|
||||
@ -1256,7 +1251,7 @@ inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __x) {return lga
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __x) {return lgammal(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
lgamma(_A1 __x) {return lgamma((double)__x);}
|
||||
|
||||
@ -1269,7 +1264,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __x) {return llrin
|
||||
inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __x) {return llrintl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, long long>::type
|
||||
llrint(_A1 __x) {return llrint((double)__x);}
|
||||
|
||||
@ -1282,7 +1277,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llround(float __x) {return llro
|
||||
inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __x) {return llroundl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, long long>::type
|
||||
llround(_A1 __x) {return llround((double)__x);}
|
||||
|
||||
@ -1295,7 +1290,7 @@ inline _LIBCPP_INLINE_VISIBILITY float log1p(float __x) {return log1
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __x) {return log1pl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
log1p(_A1 __x) {return log1p((double)__x);}
|
||||
|
||||
@ -1308,7 +1303,7 @@ inline _LIBCPP_INLINE_VISIBILITY float log2(float __x) {return log2f
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __x) {return log2l(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
log2(_A1 __x) {return log2((double)__x);}
|
||||
|
||||
@ -1321,7 +1316,7 @@ inline _LIBCPP_INLINE_VISIBILITY float logb(float __x) {return logbf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __x) {return logbl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
logb(_A1 __x) {return logb((double)__x);}
|
||||
|
||||
@ -1334,7 +1329,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lrint(float __x) {return lrintf(__x)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __x) {return lrintl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, long>::type
|
||||
lrint(_A1 __x) {return lrint((double)__x);}
|
||||
|
||||
@ -1347,7 +1342,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lround(float __x) {return lroundf(__
|
||||
inline _LIBCPP_INLINE_VISIBILITY long lround(long double __x) {return lroundl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, long>::type
|
||||
lround(_A1 __x) {return lround((double)__x);}
|
||||
|
||||
@ -1365,7 +1360,7 @@ inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __x) {return
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __x) {return nearbyintl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
nearbyint(_A1 __x) {return nearbyint((double)__x);}
|
||||
|
||||
@ -1378,7 +1373,7 @@ inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __x, long double __y) {return nextafterl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1402,7 +1397,7 @@ inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __x, long double _
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __x, long double __y) {return nexttowardl(__x, __y);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
nexttoward(_A1 __x, long double __y) {return nexttoward((double)__x, __y);}
|
||||
|
||||
@ -1415,7 +1410,7 @@ inline _LIBCPP_INLINE_VISIBILITY float remainder(float __x, float __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __x, long double __y) {return remainderl(__x, __y);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1439,7 +1434,7 @@ inline _LIBCPP_INLINE_VISIBILITY float remquo(float __x, float __y, int* _
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __x, long double __y, int* __z) {return remquol(__x, __y, __z);}
|
||||
|
||||
template <class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_arithmetic<_A1>::value &&
|
||||
@ -1463,7 +1458,7 @@ inline _LIBCPP_INLINE_VISIBILITY float rint(float __x) {return rintf
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __x) {return rintl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
rint(_A1 __x) {return rint((double)__x);}
|
||||
|
||||
@ -1476,7 +1471,7 @@ inline _LIBCPP_INLINE_VISIBILITY float round(float __x) {return roun
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double round(long double __x) {return roundl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
round(_A1 __x) {return round((double)__x);}
|
||||
|
||||
@ -1489,7 +1484,7 @@ inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __x, long __y)
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __x, long __y) {return scalblnl(__x, __y);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
scalbln(_A1 __x, long __y) {return scalbln((double)__x, __y);}
|
||||
|
||||
@ -1502,7 +1497,7 @@ inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __x, int __y) {r
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __x, int __y) {return scalbnl(__x, __y);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
scalbn(_A1 __x, int __y) {return scalbn((double)__x, __y);}
|
||||
|
||||
@ -1515,7 +1510,7 @@ inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __x) {return tga
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __x) {return tgammal(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
tgamma(_A1 __x) {return tgamma((double)__x);}
|
||||
|
||||
@ -1528,7 +1523,7 @@ inline _LIBCPP_INLINE_VISIBILITY float trunc(float __x) {return trun
|
||||
inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __x) {return truncl(__x);}
|
||||
|
||||
template <class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_integral<_A1>::value, double>::type
|
||||
trunc(_A1 __x) {return trunc((double)__x);}
|
||||
|
||||
|
@ -177,7 +177,7 @@ protected:
|
||||
|
||||
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
|
||||
codecvt_mode _Mode = (codecvt_mode)0>
|
||||
class codecvt_utf8
|
||||
class _LIBCPP_VISIBLE codecvt_utf8
|
||||
: public __codecvt_utf8<_Elem>
|
||||
{
|
||||
public:
|
||||
@ -185,6 +185,7 @@ public:
|
||||
explicit codecvt_utf8(size_t __refs = 0)
|
||||
: __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {}
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
~codecvt_utf8() {}
|
||||
};
|
||||
|
||||
@ -404,7 +405,7 @@ protected:
|
||||
|
||||
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
|
||||
codecvt_mode _Mode = (codecvt_mode)0>
|
||||
class codecvt_utf16
|
||||
class _LIBCPP_VISIBLE codecvt_utf16
|
||||
: public __codecvt_utf16<_Elem, _Mode & little_endian>
|
||||
{
|
||||
public:
|
||||
@ -412,6 +413,7 @@ public:
|
||||
explicit codecvt_utf16(size_t __refs = 0)
|
||||
: __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
~codecvt_utf16() {}
|
||||
};
|
||||
|
||||
@ -526,7 +528,7 @@ protected:
|
||||
|
||||
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
|
||||
codecvt_mode _Mode = (codecvt_mode)0>
|
||||
class codecvt_utf8_utf16
|
||||
class _LIBCPP_VISIBLE codecvt_utf8_utf16
|
||||
: public __codecvt_utf8_utf16<_Elem>
|
||||
{
|
||||
public:
|
||||
@ -534,6 +536,7 @@ public:
|
||||
explicit codecvt_utf8_utf16(size_t __refs = 0)
|
||||
: __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {}
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
~codecvt_utf8_utf16() {}
|
||||
};
|
||||
|
||||
|
@ -253,13 +253,13 @@ template<class T, class charT, class traits>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _Tp> class complex;
|
||||
template<class _Tp> class _LIBCPP_VISIBLE complex;
|
||||
|
||||
template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
|
||||
template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
|
||||
|
||||
template<class _Tp>
|
||||
class complex
|
||||
class _LIBCPP_VISIBLE complex
|
||||
{
|
||||
public:
|
||||
typedef _Tp value_type;
|
||||
@ -316,11 +316,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<> class complex<double>;
|
||||
template<> class complex<long double>;
|
||||
template<> class _LIBCPP_VISIBLE complex<double>;
|
||||
template<> class _LIBCPP_VISIBLE complex<long double>;
|
||||
|
||||
template<>
|
||||
class complex<float>
|
||||
class _LIBCPP_VISIBLE complex<float>
|
||||
{
|
||||
float __re_;
|
||||
float __im_;
|
||||
@ -375,7 +375,7 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class complex<double>
|
||||
class _LIBCPP_VISIBLE complex<double>
|
||||
{
|
||||
double __re_;
|
||||
double __im_;
|
||||
@ -430,7 +430,7 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class complex<long double>
|
||||
class _LIBCPP_VISIBLE complex<long double>
|
||||
{
|
||||
long double __re_;
|
||||
long double __im_;
|
||||
@ -781,20 +781,6 @@ operator!=(const _Tp& __x, const complex<_Tp>& __y)
|
||||
return !(__x == __y);
|
||||
}
|
||||
|
||||
/*
|
||||
Move to <istream>
|
||||
|
||||
template<class T, class charT, class traits>
|
||||
basic_istream<charT, traits>&
|
||||
operator>>(basic_istream<charT, traits>&, complex<T>&);
|
||||
|
||||
Move to <ostream>
|
||||
|
||||
template<class T, class charT, class traits>
|
||||
basic_ostream<charT, traits>&
|
||||
operator<<(basic_ostream<charT, traits>&, const complex<T>&);
|
||||
*/
|
||||
|
||||
// 26.3.7 values:
|
||||
|
||||
// real
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
class condition_variable_any
|
||||
class _LIBCPP_VISIBLE condition_variable_any
|
||||
{
|
||||
condition_variable __cv_;
|
||||
shared_ptr<mutex> __mut_;
|
||||
@ -153,11 +153,11 @@ public:
|
||||
_Predicate __pred);
|
||||
};
|
||||
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
condition_variable_any::condition_variable_any()
|
||||
: __mut_(make_shared<mutex>()) {}
|
||||
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
condition_variable_any::notify_one()
|
||||
{
|
||||
@ -165,7 +165,7 @@ condition_variable_any::notify_one()
|
||||
__cv_.notify_one();
|
||||
}
|
||||
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
condition_variable_any::notify_all()
|
||||
{
|
||||
@ -192,7 +192,7 @@ condition_variable_any::wait(_Lock& __lock)
|
||||
} // __mut_.unlock(), __lock.lock()
|
||||
|
||||
template <class _Lock, class _Predicate>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
condition_variable_any::wait(_Lock& __lock, _Predicate __pred)
|
||||
{
|
||||
@ -214,7 +214,7 @@ condition_variable_any::wait_until(_Lock& __lock,
|
||||
} // __mut_.unlock(), __lock.lock()
|
||||
|
||||
template <class _Lock, class _Clock, class _Duration, class _Predicate>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
condition_variable_any::wait_until(_Lock& __lock,
|
||||
const chrono::time_point<_Clock, _Duration>& __t,
|
||||
@ -227,7 +227,7 @@ condition_variable_any::wait_until(_Lock& __lock,
|
||||
}
|
||||
|
||||
template <class _Lock, class _Rep, class _Period>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
cv_status
|
||||
condition_variable_any::wait_for(_Lock& __lock,
|
||||
const chrono::duration<_Rep, _Period>& __d)
|
||||
@ -236,7 +236,7 @@ condition_variable_any::wait_for(_Lock& __lock,
|
||||
}
|
||||
|
||||
template <class _Lock, class _Rep, class _Period, class _Predicate>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
condition_variable_any::wait_for(_Lock& __lock,
|
||||
const chrono::duration<_Rep, _Period>& __d,
|
||||
@ -246,6 +246,7 @@ condition_variable_any::wait_for(_Lock& __lock,
|
||||
_STD::move(__pred));
|
||||
}
|
||||
|
||||
_LIBCPP_VISIBLE
|
||||
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@ -54,7 +54,7 @@ typedef long double max_align_t;
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_NULLPTR
|
||||
|
||||
struct nullptr_t
|
||||
struct _LIBCPP_VISIBLE nullptr_t
|
||||
{
|
||||
void* _;
|
||||
|
||||
|
@ -159,7 +159,7 @@ template <class _Tp, class _Allocator> class __deque_base;
|
||||
|
||||
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
|
||||
class _DiffType, _DiffType _BlockSize>
|
||||
class __deque_iterator;
|
||||
class _LIBCPP_VISIBLE __deque_iterator;
|
||||
|
||||
template <class _RAIter,
|
||||
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
|
||||
@ -251,7 +251,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
|
||||
|
||||
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
|
||||
class _DiffType, _DiffType _BlockSize>
|
||||
class __deque_iterator
|
||||
class _LIBCPP_VISIBLE __deque_iterator
|
||||
{
|
||||
typedef _MapPointer __map_iterator;
|
||||
public:
|
||||
@ -399,9 +399,9 @@ private:
|
||||
: __m_iter_(__m), __ptr_(__p) {}
|
||||
|
||||
template <class _Tp, class _A> friend class __deque_base;
|
||||
template <class _Tp, class _A> friend class deque;
|
||||
template <class _Tp, class _A> friend class _LIBCPP_VISIBLE deque;
|
||||
template <class _V, class _P, class _R, class _MP, class _D, _D>
|
||||
friend class __deque_iterator;
|
||||
friend class _LIBCPP_VISIBLE __deque_iterator;
|
||||
|
||||
template <class _RAIter,
|
||||
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
|
||||
@ -941,6 +941,7 @@ protected:
|
||||
|
||||
bool __invariants() const;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign(__deque_base& __c)
|
||||
{
|
||||
__map_ = _STD::move(__c.__map_);
|
||||
@ -950,28 +951,35 @@ protected:
|
||||
__c.__start_ = __c.size() = 0;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(__deque_base& __c)
|
||||
{__move_assign_alloc(__c, integral_constant<bool,
|
||||
__alloc_traits::propagate_on_container_move_assignment::value>());}
|
||||
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(const __deque_base& __c, true_type)
|
||||
{
|
||||
__alloc() = _STD::move(__c.__alloc());
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(const __deque_base& __c, false_type)
|
||||
{}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static void __swap_alloc(allocator_type& __x, allocator_type& __y)
|
||||
{__swap_alloc(__x, __y, integral_constant<bool,
|
||||
__alloc_traits::propagate_on_container_swap::value>());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static void __swap_alloc(allocator_type& __x, allocator_type& __y, true_type)
|
||||
{
|
||||
using _STD::swap;
|
||||
swap(__x, __y);
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static void __swap_alloc(allocator_type& __x, allocator_type& __y, false_type)
|
||||
{}
|
||||
};
|
||||
@ -1127,7 +1135,7 @@ __deque_base<_Tp, _Allocator>::clear()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator = allocator<_Tp> >
|
||||
class deque
|
||||
class _LIBCPP_VISIBLE deque
|
||||
: private __deque_base<_Tp, _Allocator>
|
||||
{
|
||||
public:
|
||||
@ -1169,6 +1177,7 @@ public:
|
||||
deque(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
deque& operator=(const deque& __c);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
@ -1185,34 +1194,48 @@ public:
|
||||
void assign(_RAIter __f, _RAIter __l,
|
||||
typename enable_if<__is_random_access_iterator<_RAIter>::value>::type* = 0);
|
||||
void assign(size_type __n, const value_type& __v);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
|
||||
|
||||
allocator_type get_allocator() const;
|
||||
|
||||
// iterators:
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator begin() {return __base::begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator begin() const {return __base::begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator end() {return __base::end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator end() const {return __base::end();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator rbegin() {return reverse_iterator(__base::end());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_reverse_iterator rbegin() const {return const_reverse_iterator(__base::end());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator rend() {return reverse_iterator(__base::begin());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_reverse_iterator rend() const {return const_reverse_iterator(__base::begin());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator cbegin() const {return __base::begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator cend() const {return __base::end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_reverse_iterator crbegin() const {return const_reverse_iterator(__base::end());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_reverse_iterator crend() const {return const_reverse_iterator(__base::begin());}
|
||||
|
||||
// capacity:
|
||||
_LIBCPP_INLINE_VISIBILITY size_type size() const {return __base::size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_size() const {return __alloc_traits::max_size(__base::__alloc());}
|
||||
void resize(size_type __n);
|
||||
void resize(size_type __n, const value_type& __v);
|
||||
void shrink_to_fit();
|
||||
bool empty() const {return __base::size() == 0;}
|
||||
_LIBCPP_INLINE_VISIBILITY bool empty() const {return __base::size() == 0;}
|
||||
|
||||
// element access:
|
||||
reference operator[](size_type __i);
|
||||
@ -1246,6 +1269,7 @@ public:
|
||||
template <class _BiIter>
|
||||
iterator insert (const_iterator __p, _BiIter __f, _BiIter __l,
|
||||
typename enable_if<__is_bidirectional_iterator<_BiIter>::value>::type* = 0);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const_iterator __p, initializer_list<value_type> __il)
|
||||
{return insert(__p, __il.begin(), __il.end());}
|
||||
void pop_front();
|
||||
@ -1256,20 +1280,25 @@ public:
|
||||
void swap(deque& __c);
|
||||
void clear();
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool __invariants() const {return __base::__invariants();}
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static size_type __recommend_blocks(size_type __n)
|
||||
{
|
||||
return __n / __base::__block_size + (__n % __base::__block_size != 0);
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type __capacity() const
|
||||
{
|
||||
return __base::__map_.size() == 0 ? 0 : __base::__map_.size() * __base::__block_size - 1;
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type __front_spare() const
|
||||
{
|
||||
return __base::__start_;
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type __back_spare() const
|
||||
{
|
||||
return __capacity() - (__base::__start_ + __base::size());
|
||||
@ -1298,10 +1327,12 @@ private:
|
||||
void __move_construct_backward_and_check(iterator __f, iterator __l,
|
||||
iterator __r, const_pointer& __vt);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __copy_assign_alloc(const deque& __c)
|
||||
{__copy_assign_alloc(__c, integral_constant<bool,
|
||||
__alloc_traits::propagate_on_container_copy_assignment::value>());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __copy_assign_alloc(const deque& __c, true_type)
|
||||
{
|
||||
if (__base::__alloc() != __c.__alloc())
|
||||
@ -1313,6 +1344,7 @@ private:
|
||||
__base::__map_.__alloc() = __c.__map_.__alloc();
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __copy_assign_alloc(const deque& __c, false_type)
|
||||
{}
|
||||
|
||||
@ -1401,14 +1433,14 @@ deque<_Tp, _Allocator>::operator=(const deque& __c)
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
deque<_Tp, _Allocator>::deque(deque&& __c)
|
||||
: __base(_STD::move(__c))
|
||||
{
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a)
|
||||
: __base(_STD::move(__c), __a)
|
||||
{
|
||||
@ -1420,7 +1452,7 @@ deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
deque<_Tp, _Allocator>&
|
||||
deque<_Tp, _Allocator>::operator=(deque&& __c)
|
||||
{
|
||||
@ -1501,7 +1533,7 @@ deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Allocator
|
||||
deque<_Tp, _Allocator>::get_allocator() const
|
||||
{
|
||||
@ -1560,7 +1592,7 @@ deque<_Tp, _Allocator>::shrink_to_fit()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::reference
|
||||
deque<_Tp, _Allocator>::operator[](size_type __i)
|
||||
{
|
||||
@ -1569,7 +1601,7 @@ deque<_Tp, _Allocator>::operator[](size_type __i)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::const_reference
|
||||
deque<_Tp, _Allocator>::operator[](size_type __i) const
|
||||
{
|
||||
@ -1578,7 +1610,7 @@ deque<_Tp, _Allocator>::operator[](size_type __i) const
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::reference
|
||||
deque<_Tp, _Allocator>::at(size_type __i)
|
||||
{
|
||||
@ -1589,7 +1621,7 @@ deque<_Tp, _Allocator>::at(size_type __i)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::const_reference
|
||||
deque<_Tp, _Allocator>::at(size_type __i) const
|
||||
{
|
||||
@ -1600,7 +1632,7 @@ deque<_Tp, _Allocator>::at(size_type __i) const
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::reference
|
||||
deque<_Tp, _Allocator>::front()
|
||||
{
|
||||
@ -1609,7 +1641,7 @@ deque<_Tp, _Allocator>::front()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::const_reference
|
||||
deque<_Tp, _Allocator>::front() const
|
||||
{
|
||||
@ -1618,7 +1650,7 @@ deque<_Tp, _Allocator>::front() const
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::reference
|
||||
deque<_Tp, _Allocator>::back()
|
||||
{
|
||||
@ -1627,7 +1659,7 @@ deque<_Tp, _Allocator>::back()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename deque<_Tp, _Allocator>::const_reference
|
||||
deque<_Tp, _Allocator>::back() const
|
||||
{
|
||||
@ -2665,7 +2697,7 @@ deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
deque<_Tp, _Allocator>::swap(deque& __c)
|
||||
{
|
||||
@ -2673,7 +2705,7 @@ deque<_Tp, _Allocator>::swap(deque& __c)
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
deque<_Tp, _Allocator>::clear()
|
||||
{
|
||||
|
@ -115,22 +115,25 @@ class exception_ptr;
|
||||
exception_ptr current_exception();
|
||||
void rethrow_exception(exception_ptr); // noreturn
|
||||
|
||||
class exception_ptr
|
||||
class _LIBCPP_VISIBLE exception_ptr
|
||||
{
|
||||
void* __ptr_;
|
||||
public:
|
||||
exception_ptr() : __ptr_() {}
|
||||
exception_ptr(nullptr_t) : __ptr_() {}
|
||||
_LIBCPP_INLINE_VISIBILITY exception_ptr() : __ptr_() {}
|
||||
_LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) : __ptr_() {}
|
||||
exception_ptr(const exception_ptr&);
|
||||
exception_ptr& operator=(const exception_ptr&);
|
||||
~exception_ptr();
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
// explicit
|
||||
operator bool() const {return __ptr_ != nullptr;}
|
||||
|
||||
friend bool operator==(const exception_ptr& __x, const exception_ptr& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator==(const exception_ptr& __x, const exception_ptr& __y)
|
||||
{return __x.__ptr_ == __y.__ptr_;}
|
||||
friend bool operator!=(const exception_ptr& __x, const exception_ptr& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator!=(const exception_ptr& __x, const exception_ptr& __y)
|
||||
{return !(__x == __y);}
|
||||
|
||||
friend exception_ptr current_exception();
|
||||
@ -166,7 +169,7 @@ public:
|
||||
|
||||
// access functions
|
||||
void rethrow_nested /*[[noreturn]]*/ () const;
|
||||
exception_ptr nested_ptr() const {return __ptr_;}
|
||||
_LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const {return __ptr_;}
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -174,7 +177,7 @@ struct __nested
|
||||
: public _Tp,
|
||||
public nested_exception
|
||||
{
|
||||
explicit __nested(const _Tp& __t) : _Tp(__t) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit __nested(const _Tp& __t) : _Tp(__t) {}
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -214,7 +217,7 @@ throw_with_nested (_Tp& __t, typename enable_if<
|
||||
}
|
||||
|
||||
template <class _E>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
rethrow_if_nested(const _E& __e, typename enable_if<
|
||||
is_polymorphic<_E>::value
|
||||
@ -226,7 +229,7 @@ rethrow_if_nested(const _E& __e, typename enable_if<
|
||||
}
|
||||
|
||||
template <class _E>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
rethrow_if_nested(const _E& __e, typename enable_if<
|
||||
!is_polymorphic<_E>::value
|
||||
|
@ -217,11 +217,13 @@ class __hash_map_hasher
|
||||
: private _Hash
|
||||
{
|
||||
public:
|
||||
__hash_map_hasher() : _Hash() {}
|
||||
__hash_map_hasher(const _Hash& __h) : _Hash(__h) {}
|
||||
const _Hash& hash_function() const {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_hasher() : _Hash() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : _Hash(__h) {}
|
||||
_LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t operator()(const _Tp& __x) const
|
||||
{return static_cast<const _Hash&>(*this)(__x.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t operator()(const typename _Tp::first_type& __x) const
|
||||
{return static_cast<const _Hash&>(*this)(__x);}
|
||||
};
|
||||
@ -231,11 +233,13 @@ class __hash_map_hasher<_Tp, _Hash, false>
|
||||
{
|
||||
_Hash __hash_;
|
||||
public:
|
||||
__hash_map_hasher() : __hash_() {}
|
||||
__hash_map_hasher(const _Hash& __h) : __hash_(__h) {}
|
||||
const _Hash& hash_function() const {return __hash_;}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_hasher() : __hash_() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : __hash_(__h) {}
|
||||
_LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const {return __hash_;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t operator()(const _Tp& __x) const
|
||||
{return __hash_(__x.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_t operator()(const typename _Tp::first_type& __x) const
|
||||
{return __hash_(__x);}
|
||||
};
|
||||
@ -245,15 +249,19 @@ class __hash_map_equal
|
||||
: private _Pred
|
||||
{
|
||||
public:
|
||||
__hash_map_equal() : _Pred() {}
|
||||
__hash_map_equal(const _Pred& __p) : _Pred(__p) {}
|
||||
const _Pred& key_eq() const {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_equal() : _Pred() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : _Pred(__p) {}
|
||||
_LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const _Tp& __x, const _Tp& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x.first, __y.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x.first, __y);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
const typename _Tp::first_type& __y) const
|
||||
{return static_cast<const _Pred&>(*this)(__x, __y);}
|
||||
@ -264,15 +272,19 @@ class __hash_map_equal<_Tp, _Pred, false>
|
||||
{
|
||||
_Pred __pred_;
|
||||
public:
|
||||
__hash_map_equal() : __pred_() {}
|
||||
__hash_map_equal(const _Pred& __p) : __pred_(__p) {}
|
||||
const _Pred& key_eq() const {return __pred_;}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_equal() : __pred_() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : __pred_(__p) {}
|
||||
_LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const {return __pred_;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const _Tp& __x, const _Tp& __y) const
|
||||
{return __pred_(__x.first, __y.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
|
||||
{return __pred_(__x, __y.first);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
|
||||
{return __pred_(__x.first, __y);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const typename _Tp::first_type& __x,
|
||||
const typename _Tp::first_type& __y) const
|
||||
{return __pred_(__x, __y);}
|
||||
@ -298,6 +310,7 @@ public:
|
||||
bool __first_constructed;
|
||||
bool __second_constructed;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit __hash_map_node_destructor(allocator_type& __na)
|
||||
: __na_(__na),
|
||||
__first_constructed(false),
|
||||
@ -305,6 +318,7 @@ public:
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@ -313,6 +327,7 @@ public:
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@ -322,6 +337,7 @@ public:
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
if (__second_constructed)
|
||||
@ -334,7 +350,7 @@ public:
|
||||
};
|
||||
|
||||
template <class _HashIterator>
|
||||
class __hash_map_iterator
|
||||
class _LIBCPP_VISIBLE __hash_map_iterator
|
||||
{
|
||||
_HashIterator __i_;
|
||||
|
||||
@ -354,14 +370,15 @@ public:
|
||||
#endif
|
||||
pointer;
|
||||
|
||||
__hash_map_iterator() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {}
|
||||
|
||||
__hash_map_iterator(_HashIterator __i) : __i_(__i) {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator(_HashIterator __i) : __i_(__i) {}
|
||||
|
||||
reference operator*() const {return *operator->();}
|
||||
pointer operator->() const {return (pointer)__i_.operator->();}
|
||||
_LIBCPP_INLINE_VISIBILITY reference operator*() const {return *operator->();}
|
||||
_LIBCPP_INLINE_VISIBILITY pointer operator->() const {return (pointer)__i_.operator->();}
|
||||
|
||||
__hash_map_iterator& operator++() {++__i_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator& operator++() {++__i_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_iterator operator++(int)
|
||||
{
|
||||
__hash_map_iterator __t(*this);
|
||||
@ -369,20 +386,22 @@ public:
|
||||
return __t;
|
||||
}
|
||||
|
||||
friend bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
|
||||
{return __x.__i_ == __y.__i_;}
|
||||
friend bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
|
||||
{return __x.__i_ != __y.__i_;}
|
||||
|
||||
template <class, class, class, class, class> friend class hash_map;
|
||||
template <class, class, class, class, class> friend class hash_multimap;
|
||||
template <class> friend class __hash_const_iterator;
|
||||
template <class> friend class __hash_const_local_iterator;
|
||||
template <class> friend class __hash_map_const_iterator;
|
||||
template <class, class, class, class, class> friend class _LIBCPP_VISIBLE hash_map;
|
||||
template <class, class, class, class, class> friend class _LIBCPP_VISIBLE hash_multimap;
|
||||
template <class> friend class _LIBCPP_VISIBLE __hash_const_iterator;
|
||||
template <class> friend class _LIBCPP_VISIBLE __hash_const_local_iterator;
|
||||
template <class> friend class _LIBCPP_VISIBLE __hash_map_const_iterator;
|
||||
};
|
||||
|
||||
template <class _HashIterator>
|
||||
class __hash_map_const_iterator
|
||||
class _LIBCPP_VISIBLE __hash_map_const_iterator
|
||||
{
|
||||
_HashIterator __i_;
|
||||
|
||||
@ -402,17 +421,23 @@ public:
|
||||
#endif
|
||||
pointer;
|
||||
|
||||
__hash_map_const_iterator() {}
|
||||
_LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_const_iterator(_HashIterator __i) : __i_(__i) {}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_const_iterator(
|
||||
__hash_map_iterator<typename _HashIterator::__non_const_iterator> __i)
|
||||
: __i_(__i.__i_) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
reference operator*() const {return *operator->();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pointer operator->() const {return (pointer)__i_.operator->();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_const_iterator& operator++() {++__i_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__hash_map_const_iterator operator++(int)
|
||||
{
|
||||
__hash_map_const_iterator __t(*this);
|
||||
@ -420,20 +445,22 @@ public:
|
||||
return __t;
|
||||
}
|
||||
|
||||
friend bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
|
||||
{return __x.__i_ == __y.__i_;}
|
||||
friend bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
|
||||
friend _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
|
||||
{return __x.__i_ != __y.__i_;}
|
||||
|
||||
template <class, class, class, class, class> friend class hash_map;
|
||||
template <class, class, class, class, class> friend class hash_multimap;
|
||||
template <class> friend class __hash_const_iterator;
|
||||
template <class> friend class __hash_const_local_iterator;
|
||||
template <class, class, class, class, class> friend class _LIBCPP_VISIBLE hash_map;
|
||||
template <class, class, class, class, class> friend class _LIBCPP_VISIBLE hash_multimap;
|
||||
template <class> friend class _LIBCPP_VISIBLE __hash_const_iterator;
|
||||
template <class> friend class _LIBCPP_VISIBLE __hash_const_local_iterator;
|
||||
};
|
||||
|
||||
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
||||
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
||||
class hash_map
|
||||
class _LIBCPP_VISIBLE hash_map
|
||||
{
|
||||
public:
|
||||
// types
|
||||
@ -480,7 +507,7 @@ public:
|
||||
typedef __hash_map_iterator<typename __table::iterator> iterator;
|
||||
typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
|
||||
|
||||
hash_map() {__table_.rehash(193);}
|
||||
_LIBCPP_INLINE_VISIBILITY hash_map() {__table_.rehash(193);}
|
||||
explicit hash_map(size_type __n, const hasher& __hf = hasher(),
|
||||
const key_equal& __eql = key_equal());
|
||||
hash_map(size_type __n, const hasher& __hf,
|
||||
@ -499,52 +526,77 @@ public:
|
||||
const allocator_type& __a);
|
||||
hash_map(const hash_map& __u);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
allocator_type get_allocator() const
|
||||
{return allocator_type(__table_.__node_alloc());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool empty() const {return __table_.size() == 0;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type size() const {return __table_.size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_size() const {return __table_.max_size();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator begin() {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator end() {return __table_.end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator begin() const {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator end() const {return __table_.end();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __p) {__table_.erase(__p.__i_);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __first, const_iterator __last)
|
||||
{__table_.erase(__first.__i_, __last.__i_);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void clear() {__table_.clear();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void swap(hash_map& __u) {__table_.swap(__u.__table_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hasher hash_funct() const
|
||||
{return __table_.hash_function().hash_function();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
key_equal key_eq() const
|
||||
{return __table_.key_eq().key_eq();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator find(const key_type& __k) {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
|
||||
mapped_type& operator[](const key_type& __k);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type bucket_count() const {return __table_.bucket_count();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_bucket_count() const {return __table_.max_bucket_count();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type elems_in_bucket(size_type __n) const
|
||||
{return __table_.bucket_size(__n);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void resize(size_type __n) {__table_.rehash(__n);}
|
||||
|
||||
private:
|
||||
@ -623,7 +675,7 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& __k)
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
_InputIterator __last)
|
||||
@ -646,7 +698,7 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
|
||||
}
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -674,7 +726,7 @@ operator==(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
}
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -684,7 +736,7 @@ operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
|
||||
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
||||
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
||||
class hash_multimap
|
||||
class _LIBCPP_VISIBLE hash_multimap
|
||||
{
|
||||
public:
|
||||
// types
|
||||
@ -729,6 +781,7 @@ public:
|
||||
typedef __hash_map_iterator<typename __table::iterator> iterator;
|
||||
typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hash_multimap() {__table_.rehash(193);}
|
||||
explicit hash_multimap(size_type __n, const hasher& __hf = hasher(),
|
||||
const key_equal& __eql = key_equal());
|
||||
@ -748,49 +801,74 @@ public:
|
||||
const allocator_type& __a);
|
||||
hash_multimap(const hash_multimap& __u);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
allocator_type get_allocator() const
|
||||
{return allocator_type(__table_.__node_alloc());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool empty() const {return __table_.size() == 0;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type size() const {return __table_.size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_size() const {return __table_.max_size();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator begin() {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator end() {return __table_.end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator begin() const {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator end() const {return __table_.end();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __p) {__table_.erase(__p.__i_);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __first, const_iterator __last)
|
||||
{__table_.erase(__first.__i_, __last.__i_);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void clear() {__table_.clear();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void swap(hash_multimap& __u) {__table_.swap(__u.__table_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hasher hash_funct() const
|
||||
{return __table_.hash_function().hash_function();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
key_equal key_eq() const
|
||||
{return __table_.key_eq().key_eq();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator find(const key_type& __k) {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
||||
{return __table_.__equal_range_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||
{return __table_.__equal_range_multi(__k);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type bucket_count() const {return __table_.bucket_count();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_bucket_count() const {return __table_.max_bucket_count();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type elems_in_bucket(size_type __n) const
|
||||
{return __table_.bucket_size(__n);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void resize(size_type __n) {__table_.rehash(__n);}
|
||||
};
|
||||
|
||||
@ -853,7 +931,7 @@ hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::hash_multimap(
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
_InputIterator __last)
|
||||
@ -863,7 +941,7 @@ hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
}
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -895,7 +973,7 @@ operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
}
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
||||
const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
||||
|
@ -205,7 +205,7 @@ using namespace std;
|
||||
|
||||
template <class _Value, class _Hash = std::hash<_Value>, class _Pred = equal_to<_Value>,
|
||||
class _Alloc = allocator<_Value> >
|
||||
class hash_set
|
||||
class _LIBCPP_VISIBLE hash_set
|
||||
{
|
||||
public:
|
||||
// types
|
||||
@ -231,6 +231,7 @@ public:
|
||||
typedef typename __table::const_iterator iterator;
|
||||
typedef typename __table::const_iterator const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hash_set() {__table_.rehash(193);}
|
||||
explicit hash_set(size_type __n, const hasher& __hf = hasher(),
|
||||
const key_equal& __eql = key_equal());
|
||||
@ -248,47 +249,72 @@ public:
|
||||
const allocator_type& __a);
|
||||
hash_set(const hash_set& __u);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
allocator_type get_allocator() const
|
||||
{return allocator_type(__table_.__node_alloc());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool empty() const {return __table_.size() == 0;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type size() const {return __table_.size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_size() const {return __table_.max_size();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator begin() {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator end() {return __table_.end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator begin() const {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator end() const {return __table_.end();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __p) {__table_.erase(__p);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __first, const_iterator __last)
|
||||
{__table_.erase(__first, __last);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void clear() {__table_.clear();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void swap(hash_set& __u) {__table_.swap(__u.__table_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hasher hash_funct() const {return __table_.hash_function();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
key_equal key_eq() const {return __table_.key_eq();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator find(const key_type& __k) {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type bucket_count() const {return __table_.bucket_count();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_bucket_count() const {return __table_.max_bucket_count();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void resize(size_type __n) {__table_.rehash(__n);}
|
||||
};
|
||||
|
||||
@ -350,7 +376,7 @@ hash_set<_Value, _Hash, _Pred, _Alloc>::hash_set(
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
hash_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
_InputIterator __last)
|
||||
@ -360,7 +386,7 @@ hash_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
}
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -388,7 +414,7 @@ operator==(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
}
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
const hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -398,7 +424,7 @@ operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
|
||||
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
|
||||
class _Alloc = allocator<_Value> >
|
||||
class hash_multiset
|
||||
class _LIBCPP_VISIBLE hash_multiset
|
||||
{
|
||||
public:
|
||||
// types
|
||||
@ -424,6 +450,7 @@ public:
|
||||
typedef typename __table::const_iterator iterator;
|
||||
typedef typename __table::const_iterator const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hash_multiset() {__table_.rehash(193);}
|
||||
explicit hash_multiset(size_type __n, const hasher& __hf = hasher(),
|
||||
const key_equal& __eql = key_equal());
|
||||
@ -441,46 +468,71 @@ public:
|
||||
const key_equal& __eql, const allocator_type& __a);
|
||||
hash_multiset(const hash_multiset& __u);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
allocator_type get_allocator() const
|
||||
{return allocator_type(__table_.__node_alloc());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
bool empty() const {return __table_.size() == 0;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type size() const {return __table_.size();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_size() const {return __table_.max_size();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator begin() {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator end() {return __table_.end();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator begin() const {return __table_.begin();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator end() const {return __table_.end();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __p) {__table_.erase(__p);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void erase(const_iterator __first, const_iterator __last)
|
||||
{__table_.erase(__first, __last);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void clear() {__table_.clear();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void swap(hash_multiset& __u) {__table_.swap(__u.__table_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
hasher hash_funct() const {return __table_.hash_function();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
key_equal key_eq() const {return __table_.key_eq();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator find(const key_type& __k) {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
||||
{return __table_.__equal_range_multi(__k);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||
{return __table_.__equal_range_multi(__k);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type bucket_count() const {return __table_.bucket_count();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type max_bucket_count() const {return __table_.max_bucket_count();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void resize(size_type __n) {__table_.rehash(__n);}
|
||||
};
|
||||
|
||||
@ -543,7 +595,7 @@ hash_multiset<_Value, _Hash, _Pred, _Alloc>::hash_multiset(
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
_InputIterator __last)
|
||||
@ -553,7 +605,7 @@ hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||
}
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
|
||||
@ -585,7 +637,7 @@ operator==(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
}
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
|
||||
const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
|
||||
|
Loading…
Reference in New Issue
Block a user