[cfe-commits] [libcxx] r114685 - in /libcxx/trunk/include: tuple type_traits typeindex typeinfo unordered_map unordered_set utility valarray vector
Howard Hinnant
hhinnant at apple.com
Thu Sep 23 11:58:29 PDT 2010
Author: hhinnant
Date: Thu Sep 23 13:58:28 2010
New Revision: 114685
URL: http://llvm.org/viewvc/llvm-project?rev=114685&view=rev
Log:
visibility-decoration sweep completed.
Modified:
libcxx/trunk/include/tuple
libcxx/trunk/include/type_traits
libcxx/trunk/include/typeindex
libcxx/trunk/include/typeinfo
libcxx/trunk/include/unordered_map
libcxx/trunk/include/unordered_set
libcxx/trunk/include/utility
libcxx/trunk/include/valarray
libcxx/trunk/include/vector
Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Thu Sep 23 13:58:28 2010
@@ -122,13 +122,13 @@
// tuple_size
template <class ..._Tp>
-class tuple_size<tuple<_Tp...>>
+class _LIBCPP_VISIBLE tuple_size<tuple<_Tp...>>
: public integral_constant<size_t, sizeof...(_Tp)>
{
};
template <class ..._Tp>
-class tuple_size<const tuple<_Tp...>>
+class _LIBCPP_VISIBLE tuple_size<const tuple<_Tp...>>
: public integral_constant<size_t, sizeof...(_Tp)>
{
};
@@ -136,14 +136,14 @@
// tuple_element
template <size_t _Ip, class ..._Tp>
-class tuple_element<_Ip, tuple<_Tp...>>
+class _LIBCPP_VISIBLE tuple_element<_Ip, tuple<_Tp...>>
{
public:
typedef typename tuple_element<_Ip, __tuple_types<_Tp...>>::type type;
};
template <size_t _Ip, class ..._Tp>
-class tuple_element<_Ip, const tuple<_Tp...>>
+class _LIBCPP_VISIBLE tuple_element<_Ip, const tuple<_Tp...>>
{
public:
typedef const typename tuple_element<_Ip, __tuple_types<_Tp...>>::type type;
@@ -155,7 +155,7 @@
class __tuple_leaf;
template <size_t _Ip, class _Hp, bool _Ep>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
{
swap(__x.get(), __y.get());
@@ -341,7 +341,9 @@
_LIBCPP_INLINE_VISIBILITY const _Hp& get() const {return static_cast<const _Hp&>(*this);}
};
-template <class ..._Tp> void __swallow(_Tp&&...) {}
+template <class ..._Tp>
+_LIBCPP_INLINE_VISIBILITY
+void __swallow(_Tp&&...) {}
// __tuple_impl
@@ -353,6 +355,7 @@
{
template <size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
+ _LIBCPP_INLINE_VISIBILITY
explicit
__tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
__tuple_indices<_Ul...>, __tuple_types<_Tl...>,
@@ -363,6 +366,7 @@
template <class _Alloc, size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
+ _LIBCPP_INLINE_VISIBILITY
explicit
__tuple_impl(allocator_arg_t, const _Alloc& __a,
__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
@@ -379,6 +383,7 @@
__tuple_convertible<_Tuple, tuple<_Tp...>>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
__tuple_impl(_Tuple&& __t)
: __tuple_leaf<_Indx, _Tp>(_STD::forward<typename tuple_element<_Indx,
typename __make_tuple_types<_Tuple>::type>::type>(_STD::get<_Indx>(__t)))...
@@ -390,6 +395,7 @@
__tuple_convertible<_Tuple, tuple<_Tp...>>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
__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,
@@ -398,6 +404,7 @@
{}
template <class _Tuple>
+ _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__tuple_assignable<_Tuple, tuple<_Tp...>>::value,
@@ -410,6 +417,7 @@
return *this;
}
+ _LIBCPP_INLINE_VISIBILITY
void swap(__tuple_impl& __t)
{
__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
@@ -417,7 +425,7 @@
};
template <class ..._Tp>
-class tuple
+class _LIBCPP_VISIBLE tuple
{
typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> base;
@@ -429,6 +437,7 @@
const typename tuple_element<_Jp, tuple<_Up...>>::type& get(const tuple<_Up...>&);
public:
+ _LIBCPP_INLINE_VISIBILITY
explicit tuple(const _Tp& ... __t)
: base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
@@ -438,6 +447,7 @@
) {}
template <class _Alloc>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
: base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -461,6 +471,7 @@
>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
explicit
tuple(_Up&&... __u)
: base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -483,6 +494,7 @@
>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
: base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -497,6 +509,7 @@
__tuple_convertible<_Tuple, tuple>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
tuple(_Tuple&& __t)
: base_(_STD::forward<_Tuple>(__t)) {}
@@ -506,6 +519,7 @@
__tuple_convertible<_Tuple, tuple>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
: base_(allocator_arg_t(), __a, _STD::forward<_Tuple>(__t)) {}
@@ -515,6 +529,7 @@
__tuple_assignable<_Tuple, tuple>::value
>::type
>
+ _LIBCPP_INLINE_VISIBILITY
tuple&
operator=(_Tuple&& __t)
{
@@ -522,22 +537,29 @@
return *this;
}
+ _LIBCPP_INLINE_VISIBILITY
void swap(tuple& __t) {base_.swap(__t.base_);}
};
template <>
-class tuple<>
+class _LIBCPP_VISIBLE tuple<>
{
public:
+ _LIBCPP_INLINE_VISIBILITY
tuple() {}
template <class _Alloc>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc&) {}
template <class _Alloc>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc&, const tuple&) {}
template <class _U>
+ _LIBCPP_INLINE_VISIBILITY
tuple(array<_U, 0>) {}
template <class _Alloc, class _U>
+ _LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc&, array<_U, 0>) {}
+ _LIBCPP_INLINE_VISIBILITY
void swap(tuple&) {}
};
@@ -549,7 +571,7 @@
// get
template <size_t _Ip, class ..._Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename tuple_element<_Ip, tuple<_Tp...>>::type&
get(tuple<_Tp...>& __t)
{
@@ -558,7 +580,7 @@
}
template <size_t _Ip, class ..._Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
const typename tuple_element<_Ip, tuple<_Tp...>>::type&
get(const tuple<_Tp...>& __t)
{
@@ -569,7 +591,7 @@
// tie
template <class ..._Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp&...>
tie(_Tp&... __t)
{
@@ -579,10 +601,13 @@
template <class _Up>
struct __ignore_t
{
+ _LIBCPP_INLINE_VISIBILITY
__ignore_t() {}
template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY
__ignore_t(_Tp&&) {}
template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY
const __ignore_t& operator=(_Tp&&) const {return *this;}
};
@@ -609,7 +634,7 @@
};
template <class... _Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<typename __make_tuple_return<_Tp>::type...>
make_tuple(_Tp&&... __t)
{
@@ -617,7 +642,7 @@
}
template <class... _Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp&&...>
forward_as_tuple(_Tp&&... __t)
{
@@ -628,6 +653,7 @@
struct __tuple_equal
{
template <class _Tp, class _Up>
+ _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Up& __y)
{
return __tuple_equal<_I - 1>()(__x, __y) && get<_I-1>(__x) == get<_I-1>(__y);
@@ -638,6 +664,7 @@
struct __tuple_equal<0>
{
template <class _Tp, class _Up>
+ _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp&, const _Up&)
{
return true;
@@ -645,7 +672,7 @@
};
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -653,7 +680,7 @@
}
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -664,6 +691,7 @@
struct __tuple_less
{
template <class _Tp, class _Up>
+ _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Up& __y)
{
return __tuple_less<_I-1>()(__x, __y) ||
@@ -675,6 +703,7 @@
struct __tuple_less<0>
{
template <class _Tp, class _Up>
+ _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp&, const _Up&)
{
return false;
@@ -682,7 +711,7 @@
};
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -690,7 +719,7 @@
}
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -698,7 +727,7 @@
}
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -706,7 +735,7 @@
}
template <class ..._Tp, class ..._Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -716,7 +745,7 @@
// tuple_cat
template <class... _Tp, size_t ..._I1, class... _Up, size_t ..._I2>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
__tuple_cat(const tuple<_Tp...>& __x, __tuple_indices<_I1...>, const tuple<_Up...>& __y, __tuple_indices<_I2...>)
{
@@ -724,7 +753,7 @@
}
template <class... _Tp, class... _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
tuple_cat(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -733,7 +762,7 @@
}
template <class... _Tp, size_t ..._I1, class... _Up, size_t ..._I2>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
__tuple_cat(tuple<_Tp...>&& __x, __tuple_indices<_I1...>, const tuple<_Up...>& __y, __tuple_indices<_I2...>)
{
@@ -741,7 +770,7 @@
}
template <class... _Tp, class... _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
tuple_cat(tuple<_Tp...>&& __x, const tuple<_Up...>& __y)
{
@@ -750,7 +779,7 @@
}
template <class... _Tp, size_t ..._I1, class... _Up, size_t ..._I2>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
__tuple_cat(const tuple<_Tp...>& __x, __tuple_indices<_I1...>, tuple<_Up...>&& __y, __tuple_indices<_I2...>)
{
@@ -758,7 +787,7 @@
}
template <class... _Tp, class... _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
tuple_cat(const tuple<_Tp...>& __x, tuple<_Up...>&& __y)
{
@@ -767,7 +796,7 @@
}
template <class... _Tp, size_t ..._I1, class... _Up, size_t ..._I2>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
__tuple_cat(tuple<_Tp...>&& __x, __tuple_indices<_I1...>, tuple<_Up...>&& __y, __tuple_indices<_I2...>)
{
@@ -775,7 +804,7 @@
}
template <class... _Tp, class... _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
tuple<_Tp..., _Up...>
tuple_cat(tuple<_Tp...>&& __x, tuple<_Up...>&& __y)
{
@@ -784,7 +813,7 @@
}
template <class ..._Tp, class _Alloc>
-struct uses_allocator<tuple<_Tp...>, _Alloc>
+struct _LIBCPP_VISIBLE uses_allocator<tuple<_Tp...>, _Alloc>
: true_type {};
template <class _T1, class _T2>
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Thu Sep 23 13:58:28 2010
@@ -144,23 +144,26 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <bool _B, class _If, class _Then> struct conditional {typedef _If type;};
-template <class _If, class _Then> struct conditional<false, _If, _Then> {typedef _Then type;};
+template <bool _B, class _If, class _Then>
+ struct _LIBCPP_VISIBLE conditional {typedef _If type;};
+template <class _If, class _Then>
+ struct _LIBCPP_VISIBLE conditional<false, _If, _Then> {typedef _Then type;};
-template <bool, class _Tp = void> struct enable_if {};
-template <class _Tp> struct enable_if<true, _Tp> {typedef _Tp type;};
+template <bool, class _Tp = void> struct _LIBCPP_VISIBLE enable_if {};
+template <class _Tp> struct _LIBCPP_VISIBLE enable_if<true, _Tp> {typedef _Tp type;};
struct __two {char _[2];};
// helper class:
template <class _Tp, _Tp __v>
-struct integral_constant
+struct _LIBCPP_VISIBLE integral_constant
{
static constexpr _Tp value = __v;
typedef _Tp value_type;
typedef integral_constant type;
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+ _LIBCPP_INLINE_VISIBILITY
constexpr operator value_type() {return value;}
#endif
};
@@ -173,27 +176,27 @@
// is_const
-template <class _Tp> struct is_const : public false_type {};
-template <class _Tp> struct is_const<_Tp const> : public true_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_const : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_const<_Tp const> : public true_type {};
// is_volatile
-template <class _Tp> struct is_volatile : public false_type {};
-template <class _Tp> struct is_volatile<_Tp volatile> : public true_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_volatile : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_volatile<_Tp volatile> : public true_type {};
// remove_const
-template <class _Tp> struct remove_const {typedef _Tp type;};
-template <class _Tp> struct remove_const<const _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_const {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_const<const _Tp> {typedef _Tp type;};
// remove_volatile
-template <class _Tp> struct remove_volatile {typedef _Tp type;};
-template <class _Tp> struct remove_volatile<volatile _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_volatile {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_volatile<volatile _Tp> {typedef _Tp type;};
// remove_cv
-template <class _Tp> struct remove_cv
+template <class _Tp> struct _LIBCPP_VISIBLE remove_cv
{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
// is_void
@@ -201,7 +204,8 @@
template <class _Tp> struct __is_void : public false_type {};
template <> struct __is_void<void> : public true_type {};
-template <class _Tp> struct is_void : public __is_void<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_void
+ : public __is_void<typename remove_cv<_Tp>::type> {};
// is_integral
@@ -224,7 +228,8 @@
template <> struct __is_integral<long long> : public true_type {};
template <> struct __is_integral<unsigned long long> : public true_type {};
-template <class _Tp> struct is_integral : public __is_integral<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_integral
+ : public __is_integral<typename remove_cv<_Tp>::type> {};
// is_floating_point
@@ -233,35 +238,40 @@
template <> struct __is_floating_point<double> : public true_type {};
template <> struct __is_floating_point<long double> : public true_type {};
-template <class _Tp> struct is_floating_point : public __is_floating_point<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_floating_point
+ : public __is_floating_point<typename remove_cv<_Tp>::type> {};
// is_array
-template <class _Tp> struct is_array : public false_type {};
-template <class _Tp> struct is_array<_Tp[]> : public true_type {};
-template <class _Tp, size_t _Np> struct is_array<_Tp[_Np]> : public true_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_array
+ : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_array<_Tp[]>
+ : public true_type {};
+template <class _Tp, size_t _Np> struct _LIBCPP_VISIBLE is_array<_Tp[_Np]>
+ : public true_type {};
// is_pointer
template <class _Tp> struct __is_pointer : public false_type {};
template <class _Tp> struct __is_pointer<_Tp*> : public true_type {};
-template <class _Tp> struct is_pointer : public __is_pointer<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_pointer
+ : public __is_pointer<typename remove_cv<_Tp>::type> {};
// is_reference
-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 _LIBCPP_VISIBLE is_lvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_lvalue_reference<_Tp&> : public true_type {};
-template <class _Tp> struct is_rvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_rvalue_reference : public false_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct is_rvalue_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE 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 {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_reference<_Tp&> : public true_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct is_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_reference<_Tp&&> : public true_type {};
#endif
#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
@@ -272,13 +282,14 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct is_union
+template <class _Tp> struct _LIBCPP_VISIBLE is_union
: public integral_constant<bool, __is_union(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
template <class _Tp> struct __libcpp_union : public false_type {};
-template <class _Tp> struct is_union : public __libcpp_union<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_union
+ : public __libcpp_union<typename remove_cv<_Tp>::type> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -286,7 +297,7 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct is_class
+template <class _Tp> struct _LIBCPP_VISIBLE is_class
: public integral_constant<bool, __is_class(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
@@ -297,7 +308,7 @@
template <class _Tp> __two __test(...);
}
-template <class _Tp> struct is_class
+template <class _Tp> struct _LIBCPP_VISIBLE is_class
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -320,14 +331,15 @@
{};
template <class _Tp> struct __is_function<_Tp, true> : public false_type {};
-template <class _Tp> struct is_function : public __is_function<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_function
+ : public __is_function<_Tp> {};
// is_member_function_pointer
template <class _Tp> struct __is_member_function_pointer : public false_type {};
template <class _Tp, class _Up> struct __is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
-template <class _Tp> struct is_member_function_pointer
+template <class _Tp> struct _LIBCPP_VISIBLE is_member_function_pointer
: public __is_member_function_pointer<typename remove_cv<_Tp>::type> {};
// is_member_pointer
@@ -335,12 +347,12 @@
template <class _Tp> struct __is_member_pointer : public false_type {};
template <class _Tp, class _Up> struct __is_member_pointer<_Tp _Up::*> : public true_type {};
-template <class _Tp> struct is_member_pointer
+template <class _Tp> struct _LIBCPP_VISIBLE is_member_pointer
: public __is_member_pointer<typename remove_cv<_Tp>::type> {};
// is_member_object_pointer
-template <class _Tp> struct is_member_object_pointer
+template <class _Tp> struct _LIBCPP_VISIBLE is_member_object_pointer
: public integral_constant<bool, is_member_pointer<_Tp>::value &&
!is_member_function_pointer<_Tp>::value> {};
@@ -348,12 +360,12 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct is_enum
+template <class _Tp> struct _LIBCPP_VISIBLE is_enum
: public integral_constant<bool, __is_enum(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct is_enum
+template <class _Tp> struct _LIBCPP_VISIBLE is_enum
: public integral_constant<bool, !is_void<_Tp>::value &&
!is_integral<_Tp>::value &&
!is_floating_point<_Tp>::value &&
@@ -369,19 +381,19 @@
// is_arithmetic
-template <class _Tp> struct is_arithmetic
+template <class _Tp> struct _LIBCPP_VISIBLE is_arithmetic
: public integral_constant<bool, is_integral<_Tp>::value ||
is_floating_point<_Tp>::value> {};
// is_fundamental
-template <class _Tp> struct is_fundamental
+template <class _Tp> struct _LIBCPP_VISIBLE is_fundamental
: public integral_constant<bool, is_void<_Tp>::value ||
is_arithmetic<_Tp>::value> {};
// is_scalar
-template <class _Tp> struct is_scalar
+template <class _Tp> struct _LIBCPP_VISIBLE is_scalar
: public integral_constant<bool, is_arithmetic<_Tp>::value ||
is_member_pointer<_Tp>::value ||
is_pointer<_Tp>::value ||
@@ -389,7 +401,7 @@
// is_object
-template <class _Tp> struct is_object
+template <class _Tp> struct _LIBCPP_VISIBLE is_object
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_array<_Tp>::value ||
is_union<_Tp>::value ||
@@ -397,7 +409,8 @@
// is_compound
-template <class _Tp> struct is_compound : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_compound
+ : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
// add_const
@@ -409,7 +422,8 @@
template <class _Tp>
struct __add_const<_Tp, false> {typedef const _Tp type;};
-template <class _Tp> struct add_const {typedef typename __add_const<_Tp>::type type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_const
+ {typedef typename __add_const<_Tp>::type type;};
// add_volatile
@@ -421,36 +435,38 @@
template <class _Tp>
struct __add_volatile<_Tp, false> {typedef volatile _Tp type;};
-template <class _Tp> struct add_volatile {typedef typename __add_volatile<_Tp>::type type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_volatile
+ {typedef typename __add_volatile<_Tp>::type type;};
// add_cv
-template <class _Tp> struct add_cv {typedef typename add_const<typename add_volatile<_Tp>::type>::type type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_cv
+ {typedef typename add_const<typename add_volatile<_Tp>::type>::type type;};
// remove_reference
-template <class _Tp> struct remove_reference {typedef _Tp type;};
-template <class _Tp> struct remove_reference<_Tp&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_reference {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_reference<_Tp&> {typedef _Tp type;};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct remove_reference<_Tp&&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_reference<_Tp&&> {typedef _Tp type;};
#endif
// add_lvalue_reference
-template <class _Tp> struct add_lvalue_reference {typedef _Tp& type;};
-template <class _Tp> struct add_lvalue_reference<_Tp&> {typedef _Tp& type;}; // for older compiler
-template <> struct add_lvalue_reference<void> {typedef void type;};
-template <> struct add_lvalue_reference<const void> {typedef const void type;};
-template <> struct add_lvalue_reference<volatile void> {typedef volatile void type;};
-template <> struct add_lvalue_reference<const volatile void> {typedef const volatile void type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_lvalue_reference {typedef _Tp& type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_lvalue_reference<_Tp&> {typedef _Tp& type;}; // for older compiler
+template <> struct _LIBCPP_VISIBLE add_lvalue_reference<void> {typedef void type;};
+template <> struct _LIBCPP_VISIBLE add_lvalue_reference<const void> {typedef const void type;};
+template <> struct _LIBCPP_VISIBLE add_lvalue_reference<volatile void> {typedef volatile void type;};
+template <> struct _LIBCPP_VISIBLE add_lvalue_reference<const volatile void> {typedef const volatile void type;};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct add_rvalue_reference {typedef _Tp&& type;};
-template <> struct add_rvalue_reference<void> {typedef void type;};
-template <> struct add_rvalue_reference<const void> {typedef const void type;};
-template <> struct add_rvalue_reference<volatile void> {typedef volatile void type;};
-template <> struct add_rvalue_reference<const volatile void> {typedef const volatile void type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_rvalue_reference {typedef _Tp&& type;};
+template <> struct _LIBCPP_VISIBLE add_rvalue_reference<void> {typedef void type;};
+template <> struct _LIBCPP_VISIBLE add_rvalue_reference<const void> {typedef const void type;};
+template <> struct _LIBCPP_VISIBLE add_rvalue_reference<volatile void> {typedef volatile void type;};
+template <> struct _LIBCPP_VISIBLE add_rvalue_reference<const volatile void> {typedef const volatile void type;};
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -475,15 +491,16 @@
// remove_pointer
-template <class _Tp> struct remove_pointer {typedef _Tp type;};
-template <class _Tp> struct remove_pointer<_Tp*> {typedef _Tp type;};
-template <class _Tp> struct remove_pointer<_Tp* const> {typedef _Tp type;};
-template <class _Tp> struct remove_pointer<_Tp* volatile> {typedef _Tp type;};
-template <class _Tp> struct remove_pointer<_Tp* const volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_pointer {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_pointer<_Tp*> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_pointer<_Tp* const> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_pointer<_Tp* volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_pointer<_Tp* const volatile> {typedef _Tp type;};
// add_pointer
-template <class _Tp> struct add_pointer {typedef typename remove_reference<_Tp>::type* type;};
+template <class _Tp> struct _LIBCPP_VISIBLE add_pointer
+ {typedef typename remove_reference<_Tp>::type* type;};
// is_signed
@@ -498,7 +515,7 @@
template <class _Tp> struct __is_signed<_Tp, false> : public false_type {};
-template <class _Tp> struct is_signed : public __is_signed<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_signed : public __is_signed<_Tp> {};
// is_unsigned
@@ -513,38 +530,52 @@
template <class _Tp> struct __is_unsigned<_Tp, false> : public false_type {};
-template <class _Tp> struct is_unsigned : public __is_unsigned<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_unsigned : public __is_unsigned<_Tp> {};
// rank
-template <class _Tp> struct rank : public integral_constant<size_t, 0> {};
-template <class _Tp> struct rank<_Tp[]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
-template <class _Tp, size_t _Np> struct rank<_Tp[_Np]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
+template <class _Tp> struct _LIBCPP_VISIBLE rank
+ : public integral_constant<size_t, 0> {};
+template <class _Tp> struct _LIBCPP_VISIBLE rank<_Tp[]>
+ : public integral_constant<size_t, rank<_Tp>::value + 1> {};
+template <class _Tp, size_t _Np> struct _LIBCPP_VISIBLE rank<_Tp[_Np]>
+ : public integral_constant<size_t, rank<_Tp>::value + 1> {};
// extent
-template <class _Tp, unsigned _Ip = 0> struct extent : public integral_constant<size_t, 0> {};
-template <class _Tp> struct extent<_Tp[], 0> : public integral_constant<size_t, 0> {};
-template <class _Tp, unsigned _Ip> struct extent<_Tp[], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
-template <class _Tp, size_t _Np> struct extent<_Tp[_Np], 0> : public integral_constant<size_t, _Np> {};
-template <class _Tp, size_t _Np, unsigned _Ip> struct extent<_Tp[_Np], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
+template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_VISIBLE extent
+ : public integral_constant<size_t, 0> {};
+template <class _Tp> struct _LIBCPP_VISIBLE extent<_Tp[], 0>
+ : public integral_constant<size_t, 0> {};
+template <class _Tp, unsigned _Ip> struct _LIBCPP_VISIBLE extent<_Tp[], _Ip>
+ : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
+template <class _Tp, size_t _Np> struct _LIBCPP_VISIBLE extent<_Tp[_Np], 0>
+ : public integral_constant<size_t, _Np> {};
+template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_VISIBLE extent<_Tp[_Np], _Ip>
+ : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
// remove_extent
-template <class _Tp> struct remove_extent {typedef _Tp type;};
-template <class _Tp> struct remove_extent<_Tp[]> {typedef _Tp type;};
-template <class _Tp, size_t _Np> struct remove_extent<_Tp[_Np]> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_extent
+ {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_extent<_Tp[]>
+ {typedef _Tp type;};
+template <class _Tp, size_t _Np> struct _LIBCPP_VISIBLE remove_extent<_Tp[_Np]>
+ {typedef _Tp type;};
// remove_all_extents
-template <class _Tp> struct remove_all_extents {typedef _Tp type;};
-template <class _Tp> struct remove_all_extents<_Tp[]> {typedef typename remove_all_extents<_Tp>::type type;};
-template <class _Tp, size_t _Np> struct remove_all_extents<_Tp[_Np]> {typedef typename remove_all_extents<_Tp>::type type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_all_extents
+ {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_VISIBLE remove_all_extents<_Tp[]>
+ {typedef typename remove_all_extents<_Tp>::type type;};
+template <class _Tp, size_t _Np> struct _LIBCPP_VISIBLE remove_all_extents<_Tp[_Np]>
+ {typedef typename remove_all_extents<_Tp>::type type;};
// is_same
-template <class _Tp, class _Up> struct is_same : public false_type {};
-template <class _Tp> struct is_same<_Tp, _Tp> : public true_type {};
+template <class _Tp, class _Up> struct _LIBCPP_VISIBLE is_same : public false_type {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_same<_Tp, _Tp> : public true_type {};
// is_abstract
@@ -559,7 +590,7 @@
template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {};
-template <class _Tp> struct is_abstract : public __libcpp_abstract<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_abstract : public __libcpp_abstract<_Tp> {};
// is_convertible
@@ -656,7 +687,8 @@
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
-template <class _T1, class _T2> struct is_convertible : public __is_convertible<_T1, _T2>
+template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
+ : public __is_convertible<_T1, _T2>
{
static const size_t __complete_check1 = __is_convertible_check<_T1>::__v;
static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
@@ -705,7 +737,7 @@
: public integral_constant<bool, __is_base_of_imp<_Bp, _Dp>::value> {};
template <class _Bp, class _Dp>
-struct is_base_of
+struct _LIBCPP_VISIBLE is_base_of
: public __libcpp_base_of<typename remove_cv<_Bp>::type, typename remove_cv<_Dp>::type>
{
};
@@ -729,7 +761,7 @@
template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {};
-template <class _Tp> struct is_empty : public __libcpp_empty<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_empty : public __libcpp_empty<_Tp> {};
// is_polymorphic
@@ -742,13 +774,14 @@
template <class _Tp> struct __libcpp_polymorphic<_Tp, false> : public false_type {};
-template <class _Tp> struct is_polymorphic : public __libcpp_polymorphic<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE is_polymorphic
+ : public __libcpp_polymorphic<_Tp> {};
// has_trivial_default_constructor
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_trivial_default_constructor
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_default_constructor
: public integral_constant<bool, __has_trivial_constructor(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
@@ -756,7 +789,7 @@
template <class _Tp> struct __has_trivial_default_constructor
: public integral_constant<bool, is_scalar<_Tp>::value> {};
-template <class _Tp> struct has_trivial_default_constructor
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_default_constructor
: public __has_trivial_default_constructor<typename remove_all_extents<_Tp>::type> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -765,12 +798,12 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_nothrow_default_constructor
+template <class _Tp> struct _LIBCPP_VISIBLE 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
+template <class _Tp> struct _LIBCPP_VISIBLE has_nothrow_default_constructor
: public has_trivial_default_constructor<_Tp> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -779,12 +812,12 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_trivial_copy_constructor
+template <class _Tp> struct _LIBCPP_VISIBLE 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
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_copy_constructor
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
@@ -794,30 +827,31 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_nothrow_copy_constructor
+template <class _Tp> struct _LIBCPP_VISIBLE 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
+template <class _Tp> struct _LIBCPP_VISIBLE has_nothrow_copy_constructor
: public has_trivial_copy_constructor<_Tp> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
// has_nothrow_move_constructor
-template <class _Tp> struct has_nothrow_move_constructor : public has_nothrow_copy_constructor<_Tp> {};
+template <class _Tp> struct _LIBCPP_VISIBLE has_nothrow_move_constructor
+ : public has_nothrow_copy_constructor<_Tp> {};
// has_trivial_copy_assign
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_trivial_copy_assign
+template <class _Tp> struct _LIBCPP_VISIBLE 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
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_copy_assign
: public integral_constant<bool, is_scalar<_Tp>::value &&
!is_const<_Tp>::value> {};
@@ -827,12 +861,12 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_nothrow_copy_assign
+template <class _Tp> struct _LIBCPP_VISIBLE 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
+template <class _Tp> struct _LIBCPP_VISIBLE has_nothrow_copy_assign
: public has_trivial_copy_assign<_Tp> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -841,7 +875,7 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_trivial_destructor
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_destructor
: public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
#else // _LIBCPP_HAS_TYPE_TRAITS
@@ -850,7 +884,7 @@
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
-template <class _Tp> struct has_trivial_destructor
+template <class _Tp> struct _LIBCPP_VISIBLE has_trivial_destructor
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -859,12 +893,13 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct has_virtual_destructor
+template <class _Tp> struct _LIBCPP_VISIBLE 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 {};
+template <class _Tp> struct _LIBCPP_VISIBLE has_virtual_destructor
+ : public false_type {};
#endif // _LIBCPP_HAS_TYPE_TRAITS
@@ -872,15 +907,16 @@
#ifdef _LIBCPP_HAS_TYPE_TRAITS
-template <class _Tp> struct is_pod
+template <class _Tp> struct _LIBCPP_VISIBLE 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> {};
+template <class _Tp> struct _LIBCPP_VISIBLE 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
@@ -888,7 +924,7 @@
template <class _Tp> struct __alignment_of {_Tp _;};
-template <class _Tp> struct alignment_of
+template <class _Tp> struct _LIBCPP_VISIBLE alignment_of
: public integral_constant<size_t, __alignof__(__alignment_of<typename remove_all_extents<_Tp>::type>)> {};
// aligned_storage
@@ -968,7 +1004,7 @@
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
template <size_t _Len, const size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct aligned_storage
+struct _LIBCPP_VISIBLE aligned_storage
{
typedef typename __find_pod<__all_types, _Align>::type _Aligner;
static_assert(!is_void<_Aligner>::value, "");
@@ -981,7 +1017,7 @@
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
template <size_t _Len>\
-struct aligned_storage<_Len, n>\
+struct __attribute__ ((__visibility__("default"))) aligned_storage<_Len, n>\
{\
struct type\
{\
@@ -1161,7 +1197,7 @@
template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
template <class _Tp>
-struct make_signed
+struct _LIBCPP_VISIBLE make_signed
{
typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1186,7 +1222,7 @@
template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
template <class _Tp>
-struct make_unsigned
+struct _LIBCPP_VISIBLE make_unsigned
{
typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1194,21 +1230,21 @@
#ifdef _LIBCPP_HAS_NO_VARIADICS
template <class _Tp, class _Up = void, class V = void>
-struct common_type
+struct _LIBCPP_VISIBLE common_type
{
public:
typedef typename common_type<typename common_type<_Tp, _Up>::type, V>::type type;
};
template <class _Tp>
-struct common_type<_Tp, void, void>
+struct _LIBCPP_VISIBLE common_type<_Tp, void, void>
{
public:
typedef _Tp type;
};
template <class _Tp, class _Up>
-struct common_type<_Tp, _Up, void>
+struct _LIBCPP_VISIBLE common_type<_Tp, _Up, void>
{
private:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -1228,13 +1264,13 @@
template <class ..._Tp> struct common_type;
template <class _Tp>
-struct common_type<_Tp>
+struct _LIBCPP_VISIBLE common_type<_Tp>
{
typedef _Tp type;
};
template <class _Tp, class _Up>
-struct common_type<_Tp, _Up>
+struct _LIBCPP_VISIBLE common_type<_Tp, _Up>
{
private:
static _Tp&& __t();
@@ -1245,7 +1281,7 @@
};
template <class _Tp, class _Up, class ..._Vp>
-struct common_type<_Tp, _Up, _Vp...>
+struct _LIBCPP_VISIBLE common_type<_Tp, _Up, _Vp...>
{
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
};
@@ -1281,13 +1317,13 @@
// has_copy_assign
-template <class _Tp> struct has_copy_assign
+template <class _Tp> struct _LIBCPP_VISIBLE has_copy_assign
: public __is_assignable<_Tp&, const _Tp&> {};
-template <class _Tp> struct has_copy_assign<_Tp[]>
+template <class _Tp> struct _LIBCPP_VISIBLE has_copy_assign<_Tp[]>
: public false_type {};
-template <class _Tp> struct has_copy_assign<_Tp&>
+template <class _Tp> struct _LIBCPP_VISIBLE has_copy_assign<_Tp&>
: public false_type {};
// move
@@ -1378,12 +1414,14 @@
typedef typename remove_reference<_Tp>::type _Trr;
_Trr& t_;
public:
+ _LIBCPP_INLINE_VISIBILITY
_Trr* operator->() {return &t_;}
+ _LIBCPP_INLINE_VISIBILITY
explicit __rv(_Trr& __t) : t_(__t) {}
};
template <class _Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
!is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1395,7 +1433,7 @@
}
template <class _Tp>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1407,7 +1445,7 @@
}
template <class _Tp, class _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
!is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1419,7 +1457,7 @@
}
template <class _Tp, class _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
!is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1431,7 +1469,7 @@
}
template <class _Tp, class _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1443,7 +1481,7 @@
}
template <class _Tp, class _Up>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_convertible<_Tp, __rv<_Tp> >::value,
@@ -1457,7 +1495,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-struct decay
+struct _LIBCPP_VISIBLE decay
{
private:
typedef typename remove_reference<_Tp>::type _Up;
@@ -1559,7 +1597,7 @@
// result_of
template <class _Fn, class ..._ArgTypes>
-class result_of<_Fn(_ArgTypes...)>
+class _LIBCPP_VISIBLE result_of<_Fn(_ArgTypes...)>
: public __result_of<_Fn(_ArgTypes...),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<
@@ -1601,7 +1639,7 @@
};
template <class _Fn>
-class result_of<_Fn()>
+class _LIBCPP_VISIBLE result_of<_Fn()>
: public __result_of<_Fn(),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<
@@ -1613,7 +1651,7 @@
};
template <class _Fn, class _A0>
-class result_of<_Fn(_A0)>
+class _LIBCPP_VISIBLE result_of<_Fn(_A0)>
: public __result_of<_Fn(_A0),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<
@@ -1625,7 +1663,7 @@
};
template <class _Fn, class _A0, class _A1>
-class result_of<_Fn(_A0, _A1)>
+class _LIBCPP_VISIBLE result_of<_Fn(_A0, _A1)>
: public __result_of<_Fn(_A0, _A1),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<
@@ -1637,7 +1675,7 @@
};
template <class _Fn, class _A0, class _A1, class _A2>
-class result_of<_Fn(_A0, _A1, _A2)>
+class _LIBCPP_VISIBLE result_of<_Fn(_A0, _A1, _A2)>
: public __result_of<_Fn(_A0, _A1, _A2),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<
@@ -1742,7 +1780,7 @@
// is_constructible entry point
template <class _Tp, class... _Args>
-struct is_constructible
+struct _LIBCPP_VISIBLE is_constructible
: public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value
|| is_abstract<_Tp>::value,
_Tp, _Args...>
@@ -1771,7 +1809,7 @@
{};
template <class _Tp>
-struct has_default_constructor
+struct _LIBCPP_VISIBLE has_default_constructor
: public is_constructible<_Tp>
{};
@@ -1823,7 +1861,7 @@
// has_default_constructor entry point
template <class _Tp>
-struct has_default_constructor
+struct _LIBCPP_VISIBLE has_default_constructor
: public __is_constructible0_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value,
_Tp>
@@ -1851,14 +1889,14 @@
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
template <class _Tp>
-struct has_copy_constructor
+struct _LIBCPP_VISIBLE 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
+struct _LIBCPP_VISIBLE has_copy_constructor
: public has_nothrow_copy_constructor<_Tp>
{};
Modified: libcxx/trunk/include/typeindex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/typeindex?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/typeindex (original)
+++ libcxx/trunk/include/typeindex Thu Sep 23 13:58:28 2010
@@ -53,29 +53,39 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-class type_index
+class _LIBCPP_VISIBLE type_index
{
const type_info* __t_;
public:
+ _LIBCPP_INLINE_VISIBILITY
type_index(const type_info& __y) : __t_(&__y) {}
+ _LIBCPP_INLINE_VISIBILITY
bool operator==(const type_index& __y) const {return *__t_ == *__y.__t_;}
+ _LIBCPP_INLINE_VISIBILITY
bool operator!=(const type_index& __y) const {return *__t_ != *__y.__t_;}
+ _LIBCPP_INLINE_VISIBILITY
bool operator< (const type_index& __y) const {return __t_->before(*__y.__t_);}
+ _LIBCPP_INLINE_VISIBILITY
bool operator<=(const type_index& __y) const {return !__y.__t_->before(*__t_);}
+ _LIBCPP_INLINE_VISIBILITY
bool operator> (const type_index& __y) const {return __y.__t_->before(*__t_);}
+ _LIBCPP_INLINE_VISIBILITY
bool operator>=(const type_index& __y) const {return !__t_->before(*__y.__t_);}
+ _LIBCPP_INLINE_VISIBILITY
size_t hash_code() const {return __t_->hash_code();}
+ _LIBCPP_INLINE_VISIBILITY
const char* name() const {return __t_->name();}
};
-template <class _Tp> struct hash;
+template <class _Tp> struct _LIBCPP_VISIBLE hash;
template <>
-struct hash<type_index>
+struct _LIBCPP_VISIBLE hash<type_index>
: public unary_function<type_index, size_t>
{
+ _LIBCPP_INLINE_VISIBILITY
size_t operator()(type_index __index) const {return __index.hash_code();}
};
Modified: libcxx/trunk/include/typeinfo
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/typeinfo?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/typeinfo (original)
+++ libcxx/trunk/include/typeinfo Thu Sep 23 13:58:28 2010
@@ -73,21 +73,27 @@
protected:
const char* __type_name;
+ _LIBCPP_INLINE_VISIBILITY
explicit type_info(const char* __n)
: __type_name(__n) {}
public:
virtual ~type_info();
+ _LIBCPP_INLINE_VISIBILITY
const char* name() const {return __type_name;}
+ _LIBCPP_INLINE_VISIBILITY
bool before(const type_info& __arg) const
{return __type_name < __arg.__type_name;}
+ _LIBCPP_INLINE_VISIBILITY
size_t hash_code() const throw()
{return *reinterpret_cast<const size_t*>(&__type_name);}
+ _LIBCPP_INLINE_VISIBILITY
bool operator==(const type_info& __arg) const
{return __type_name == __arg.__type_name;}
+ _LIBCPP_INLINE_VISIBILITY
bool operator!=(const type_info& __arg) const
{return !operator==(__arg);}
Modified: libcxx/trunk/include/unordered_map
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/unordered_map?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/unordered_map (original)
+++ libcxx/trunk/include/unordered_map Thu Sep 23 13:58:28 2010
@@ -288,11 +288,16 @@
: private _Hash
{
public:
+ _LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher() : _Hash() {}
+ _LIBCPP_INLINE_VISIBILITY
__unordered_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);}
};
@@ -302,11 +307,16 @@
{
_Hash __hash_;
public:
+ _LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher() : __hash_() {}
+ _LIBCPP_INLINE_VISIBILITY
__unordered_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);}
};
@@ -316,15 +326,22 @@
: private _Pred
{
public:
+ _LIBCPP_INLINE_VISIBILITY
__unordered_map_equal() : _Pred() {}
+ _LIBCPP_INLINE_VISIBILITY
__unordered_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);}
@@ -335,15 +352,22 @@
{
_Pred __pred_;
public:
+ _LIBCPP_INLINE_VISIBILITY
__unordered_map_equal() : __pred_() {}
+ _LIBCPP_INLINE_VISIBILITY
__unordered_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);}
@@ -369,6 +393,7 @@
bool __first_constructed;
bool __second_constructed;
+ _LIBCPP_INLINE_VISIBILITY
explicit __hash_map_node_destructor(allocator_type& __na)
: __na_(__na),
__first_constructed(false),
@@ -376,6 +401,7 @@
{}
#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),
@@ -384,6 +410,7 @@
__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),
@@ -393,6 +420,7 @@
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
void operator()(pointer __p)
{
if (__second_constructed)
@@ -405,7 +433,7 @@
};
template <class _HashIterator>
-class __hash_map_iterator
+class _LIBCPP_VISIBLE __hash_map_iterator
{
_HashIterator __i_;
@@ -425,14 +453,20 @@
#endif
pointer;
+ _LIBCPP_INLINE_VISIBILITY
__hash_map_iterator() {}
+ _LIBCPP_INLINE_VISIBILITY
__hash_map_iterator(_HashIterator __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_iterator& operator++() {++__i_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY
__hash_map_iterator operator++(int)
{
__hash_map_iterator __t(*this);
@@ -440,20 +474,22 @@
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 unordered_map;
- template <class, class, class, class, class> friend class unordered_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 unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_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_;
@@ -473,17 +509,24 @@
#endif
pointer;
+ _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);
@@ -491,20 +534,22 @@
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 unordered_map;
- template <class, class, class, class, class> friend class unordered_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 unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_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 unordered_map
+class _LIBCPP_VISIBLE unordered_map
{
public:
// types
@@ -553,6 +598,7 @@
typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
+ _LIBCPP_INLINE_VISIBILITY
unordered_map() {} // = default;
explicit unordered_map(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -590,26 +636,38 @@
#endif
unordered_map& operator=(initializer_list<value_type> __il);
+ _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
const_iterator cbegin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> emplace()
{return __table_.__emplace_unique();}
template <class _A0,
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> emplace(_A0&& __a0)
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0));}
@@ -621,11 +679,13 @@
#endif // _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace_hint(const_iterator)
{return __table_.__emplace_unique().first;}
template <class _A0,
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace_hint(const_iterator, _A0&& __a0)
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0)).first;}
@@ -633,50 +693,68 @@
template <class _A0, class... _Args,
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
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
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
{return __table_.__insert_unique(__x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _P,
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(_P&& __x)
{return __table_.__insert_unique(_STD::forward<_P>(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x)
{return insert(__x).first;}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _P,
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, _P&& __x)
{return insert(_STD::forward<_P>(__x)).first;}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first.__i_, __last.__i_);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(unordered_map& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_function() 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);}
@@ -688,24 +766,39 @@
mapped_type& at(const key_type& __k);
const mapped_type& at(const key_type& __k) const;
+ _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 bucket_size(size_type __n) const
{return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator begin(size_type __n) {return __table_.begin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator end(size_type __n) {return __table_.end(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator begin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator end(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
+ _LIBCPP_INLINE_VISIBILITY
void rehash(size_type __n) {__table_.rehash(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
private:
@@ -741,7 +834,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
const allocator_type& __a)
: __table_(__a)
@@ -799,7 +892,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
unordered_map&& __u)
: __table_(_STD::move(__u.__table_))
@@ -853,7 +946,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
{
@@ -864,7 +957,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
initializer_list<value_type> __il)
@@ -950,7 +1043,7 @@
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -1014,7 +1107,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -1042,7 +1135,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -1052,7 +1145,7 @@
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class unordered_multimap
+class _LIBCPP_VISIBLE unordered_multimap
{
public:
// types
@@ -1099,6 +1192,7 @@
typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
+ _LIBCPP_INLINE_VISIBILITY
unordered_multimap() {} // = default
explicit unordered_multimap(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -1137,26 +1231,38 @@
#endif
unordered_multimap& operator=(initializer_list<value_type> __il);
+ _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
const_iterator cbegin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace()
{return __table_.__emplace_multi();}
template <class _A0,
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace(_A0&& __a0)
{return __table_.__emplace_multi(_STD::forward<_A0>(__a0));}
@@ -1168,11 +1274,13 @@
#endif // _LIBCPP_HAS_NO_VARIADICS
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace_hint(const_iterator __p)
{return __table_.__emplace_hint_multi(__p.__i_);}
template <class _A0,
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace_hint(const_iterator __p, _A0&& __a0)
{return __table_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));}
@@ -1183,65 +1291,97 @@
iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&&... __args);
#endif // _LIBCPP_HAS_NO_VARIADICS
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _P,
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(_P&& __x)
{return __table_.__insert_multi(_STD::forward<_P>(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, const value_type& __x)
{return __table_.__insert_multi(__p.__i_, __x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _P,
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, _P&& __x)
{return __table_.__insert_multi(__p.__i_, _STD::forward<_P>(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first.__i_, __last.__i_);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(unordered_multimap& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_function() 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 bucket_size(size_type __n) const
{return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator begin(size_type __n) {return __table_.begin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator end(size_type __n) {return __table_.end(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator begin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator end(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
+ _LIBCPP_INLINE_VISIBILITY
void rehash(size_type __n) {__table_.rehash(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
private:
@@ -1303,7 +1443,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
const allocator_type& __a)
: __table_(__a)
@@ -1331,7 +1471,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
unordered_multimap&& __u)
: __table_(_STD::move(__u.__table_))
@@ -1387,7 +1527,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u)
{
@@ -1398,7 +1538,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
initializer_list<value_type> __il)
@@ -1483,7 +1623,7 @@
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -1493,7 +1633,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -1525,7 +1665,7 @@
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
Modified: libcxx/trunk/include/unordered_set
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/unordered_set?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/unordered_set (original)
+++ libcxx/trunk/include/unordered_set Thu Sep 23 13:58:28 2010
@@ -271,7 +271,7 @@
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class unordered_set
+class _LIBCPP_VISIBLE unordered_set
{
public:
// types
@@ -299,6 +299,7 @@
typedef typename __table::const_local_iterator local_iterator;
typedef typename __table::const_local_iterator const_local_iterator;
+ _LIBCPP_INLINE_VISIBILITY
unordered_set() {} // = default;
explicit unordered_set(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -335,81 +336,125 @@
#endif
unordered_set& operator=(initializer_list<value_type> __il);
+ _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
const_iterator cbegin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
template <class... _Args>
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> emplace(_Args&&... __args)
{return __table_.__emplace_unique(_STD::forward<_Args>(__args)...);}
template <class... _Args>
+ _LIBCPP_INLINE_VISIBILITY
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)
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
{return __table_.__insert_unique(__x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(value_type&& __x)
{return __table_.__insert_unique(_STD::move(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, const value_type& __x)
{return insert(__x).first;}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator, value_type&& __x)
{return insert(_STD::move(__x)).first;}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first, __last);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(unordered_set& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_function() 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 bucket_size(size_type __n) const {return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator begin(size_type __n) {return __table_.begin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator end(size_type __n) {return __table_.end(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator begin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator end(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
+ _LIBCPP_INLINE_VISIBILITY
void rehash(size_type __n) {__table_.rehash(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
};
@@ -460,7 +505,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
const allocator_type& __a)
: __table_(__a)
@@ -488,7 +533,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
unordered_set&& __u)
: __table_(_STD::move(__u.__table_))
@@ -540,7 +585,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_set<_Value, _Hash, _Pred, _Alloc>&
unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
{
@@ -551,7 +596,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_set<_Value, _Hash, _Pred, _Alloc>&
unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(
initializer_list<value_type> __il)
@@ -562,7 +607,7 @@
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -572,7 +617,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -600,7 +645,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -610,7 +655,7 @@
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class unordered_multiset
+class _LIBCPP_VISIBLE unordered_multiset
{
public:
// types
@@ -638,6 +683,7 @@
typedef typename __table::const_local_iterator local_iterator;
typedef typename __table::const_local_iterator const_local_iterator;
+ _LIBCPP_INLINE_VISIBILITY
unordered_multiset() {} // = default
explicit unordered_multiset(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -674,79 +720,123 @@
#endif
unordered_multiset& operator=(initializer_list<value_type> __il);
+ _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
const_iterator cbegin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
template <class... _Args>
+ _LIBCPP_INLINE_VISIBILITY
iterator emplace(_Args&&... __args)
{return __table_.__emplace_multi(_STD::forward<_Args>(__args)...);}
template <class... _Args>
+ _LIBCPP_INLINE_VISIBILITY
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)
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(value_type&& __x) {return __table_.__insert_multi(_STD::move(__x));}
#endif
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, const value_type& __x)
{return __table_.__insert_multi(__p, __x);}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, value_type&& __x)
{return __table_.__insert_multi(__p, _STD::move(__x));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __table_.erase(__p);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first, __last);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(unordered_multiset& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_function() 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 bucket_size(size_type __n) const {return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator begin(size_type __n) {return __table_.begin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
local_iterator end(size_type __n) {return __table_.end(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator begin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator end(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
+ _LIBCPP_INLINE_VISIBILITY
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
+ _LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
+ _LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
+ _LIBCPP_INLINE_VISIBILITY
void rehash(size_type __n) {__table_.rehash(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void reserve(size_type __n) {__table_.reserve(__n);}
};
@@ -798,7 +888,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
const allocator_type& __a)
: __table_(__a)
@@ -826,7 +916,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
unordered_multiset&& __u)
: __table_(_STD::move(__u.__table_))
@@ -878,7 +968,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
unordered_multiset<_Value, _Hash, _Pred, _Alloc>&
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
unordered_multiset&& __u)
@@ -901,7 +991,7 @@
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -911,7 +1001,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -943,7 +1033,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
Modified: libcxx/trunk/include/utility
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/utility?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/utility (original)
+++ libcxx/trunk/include/utility Thu Sep 23 13:58:28 2010
@@ -186,7 +186,7 @@
return _STD::move(__x);
}
-struct piecewise_construct_t { };
+struct _LIBCPP_VISIBLE piecewise_construct_t { };
//constexpr
extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
@@ -194,7 +194,7 @@
template <class _T1, class _T2> void swap(pair<_T1, _T2>&, pair<_T1, _T2>&);
template <class _T1, class _T2>
-struct pair
+struct _LIBCPP_VISIBLE pair
{
typedef _T1 first_type;
typedef _T2 second_type;
@@ -231,6 +231,7 @@
{}
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
+ _LIBCPP_INLINE_VISIBILITY
pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args)
: pair(__pc, __first_args, __second_args,
@@ -240,6 +241,7 @@
template <class _Tuple,
class = typename enable_if<__tuple_assignable<_Tuple, pair>::value>::type>
+ _LIBCPP_INLINE_VISIBILITY
pair&
operator=(_Tuple&& __p)
{
@@ -349,7 +351,7 @@
};
template <class _T1, class _T2>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
pair<typename __make_pair_return<_T1>::type, typename __make_pair_return<_T2>::type>
make_pair(_T1&& __t1, _T2&& __t2)
{
@@ -372,34 +374,36 @@
#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class _T1, class _T2>
- class tuple_size<pair<_T1, _T2> > : public integral_constant<size_t, 2> {};
+ class _LIBCPP_VISIBLE tuple_size<pair<_T1, _T2> >
+ : public integral_constant<size_t, 2> {};
template <class _T1, class _T2>
- class tuple_size<const pair<_T1, _T2> > : public integral_constant<size_t, 2> {};
+ class _LIBCPP_VISIBLE tuple_size<const pair<_T1, _T2> >
+ : public integral_constant<size_t, 2> {};
template <class _T1, class _T2>
-class tuple_element<0, pair<_T1, _T2> >
+class _LIBCPP_VISIBLE tuple_element<0, pair<_T1, _T2> >
{
public:
typedef _T1 type;
};
template <class _T1, class _T2>
-class tuple_element<1, pair<_T1, _T2> >
+class _LIBCPP_VISIBLE tuple_element<1, pair<_T1, _T2> >
{
public:
typedef _T2 type;
};
template <class _T1, class _T2>
-class tuple_element<0, const pair<_T1, _T2> >
+class _LIBCPP_VISIBLE tuple_element<0, const pair<_T1, _T2> >
{
public:
typedef const _T1 type;
};
template <class _T1, class _T2>
-class tuple_element<1, const pair<_T1, _T2> >
+class _LIBCPP_VISIBLE tuple_element<1, const pair<_T1, _T2> >
{
public:
typedef const _T2 type;
Modified: libcxx/trunk/include/valarray
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/valarray?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/valarray (original)
+++ libcxx/trunk/include/valarray Thu Sep 23 13:58:28 2010
@@ -352,29 +352,29 @@
template<class _Tp> class valarray;
-class slice
+class _LIBCPP_VISIBLE slice
{
size_t __start_;
size_t __size_;
size_t __stride_;
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
slice()
: __start_(0),
__size_(0),
__stride_(0)
{}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
slice(size_t __start, size_t __size, size_t __stride)
: __start_(__start),
__size_(__size),
__stride_(__stride)
{}
- _LIBCPP_ALWAYS_INLINE size_t start() const {return __start_;}
- _LIBCPP_ALWAYS_INLINE size_t size() const {return __size_;}
- _LIBCPP_ALWAYS_INLINE size_t stride() const {return __stride_;}
+ _LIBCPP_INLINE_VISIBILITY size_t start() const {return __start_;}
+ _LIBCPP_INLINE_VISIBILITY size_t size() const {return __size_;}
+ _LIBCPP_INLINE_VISIBILITY size_t stride() const {return __stride_;}
};
template <class _Tp> class slice_array;
@@ -408,13 +408,13 @@
_Op __op_;
_A0 __a0_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_UnaryOp(const _Op& __op, const _A0& __a0) : __op_(__op), __a0_(__a0) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const {return __op_(__a0_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
@@ -428,14 +428,14 @@
_A0 __a0_;
_A1 __a1_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_BinaryOp(const _Op& __op, const _A0& __a0, const _A1& __a1)
: __op_(__op), __a0_(__a0), __a1_(__a1) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
value_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
@@ -449,20 +449,20 @@
const value_type& __t_;
size_t __s_;
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
explicit __scalar_expr(const value_type& __t, size_t __s) : __t_(__t), __s_(__s) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t) const {return __t_;}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __s_;}
};
template <class _Tp>
struct __unary_plus : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return +__x;}
};
@@ -470,7 +470,7 @@
template <class _Tp>
struct __bit_not : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return ~__x;}
};
@@ -478,7 +478,7 @@
template <class _Tp>
struct __bit_shift_left : binary_function<_Tp, _Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x << __y;}
};
@@ -486,7 +486,7 @@
template <class _Tp>
struct __bit_shift_right : binary_function<_Tp, _Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x >> __y;}
};
@@ -497,10 +497,10 @@
private:
_F __f_;
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
explicit __apply_expr(_F __f) : __f_(__f) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return __f_(__x);}
};
@@ -508,7 +508,7 @@
template <class _Tp>
struct __abs_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return abs(__x);}
};
@@ -516,7 +516,7 @@
template <class _Tp>
struct __acos_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return acos(__x);}
};
@@ -524,7 +524,7 @@
template <class _Tp>
struct __asin_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return asin(__x);}
};
@@ -532,7 +532,7 @@
template <class _Tp>
struct __atan_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return atan(__x);}
};
@@ -540,7 +540,7 @@
template <class _Tp>
struct __atan2_expr : binary_function<_Tp, _Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return atan2(__x, __y);}
};
@@ -548,7 +548,7 @@
template <class _Tp>
struct __cos_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return cos(__x);}
};
@@ -556,7 +556,7 @@
template <class _Tp>
struct __cosh_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return cosh(__x);}
};
@@ -564,7 +564,7 @@
template <class _Tp>
struct __exp_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return exp(__x);}
};
@@ -572,7 +572,7 @@
template <class _Tp>
struct __log_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return log(__x);}
};
@@ -580,7 +580,7 @@
template <class _Tp>
struct __log10_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return log10(__x);}
};
@@ -588,7 +588,7 @@
template <class _Tp>
struct __pow_expr : binary_function<_Tp, _Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return pow(__x, __y);}
};
@@ -596,7 +596,7 @@
template <class _Tp>
struct __sin_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return sin(__x);}
};
@@ -604,7 +604,7 @@
template <class _Tp>
struct __sinh_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return sinh(__x);}
};
@@ -612,7 +612,7 @@
template <class _Tp>
struct __sqrt_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return sqrt(__x);}
};
@@ -620,7 +620,7 @@
template <class _Tp>
struct __tan_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return tan(__x);}
};
@@ -628,7 +628,7 @@
template <class _Tp>
struct __tanh_expr : unary_function<_Tp, _Tp>
{
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return tanh(__x);}
};
@@ -647,7 +647,7 @@
size_t __size_;
size_t __stride_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__slice_expr(const slice& __sl, const _RmExpr& __e)
: __expr_(__e),
__start_(__sl.start()),
@@ -656,14 +656,14 @@
{}
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const
{return __expr_[__start_ + __i * __stride_];}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __size_;}
- template <class> friend class valarray;
+ template <class> friend class _LIBCPP_VISIBLE valarray;
};
template <class _ValExpr>
@@ -689,7 +689,7 @@
static const ptrdiff_t _N = static_cast<ptrdiff_t>(
sizeof(ptrdiff_t) * __CHAR_BIT__ - 1);
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__shift_expr(int __n, const _RmExpr& __e)
: __expr_(__e),
__size_(__e.size()),
@@ -701,7 +701,7 @@
}
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __j) const
{
ptrdiff_t __i = static_cast<size_t>(__j);
@@ -709,7 +709,7 @@
return (__expr_[(__i + __n_) & __m] & __m) | (value_type() & ~__m);
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __size_;}
template <class> friend class __val_expr;
@@ -730,7 +730,7 @@
size_t __o1_;
size_t __o2_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__cshift_expr(int __n, const _RmExpr& __e)
: __expr_(__e),
__size_(__e.size())
@@ -751,7 +751,7 @@
}
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const
{
if (__i < __m_)
@@ -759,7 +759,7 @@
return __expr_[__i + __o2_];
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __size_;}
template <class> friend class __val_expr;
@@ -778,7 +778,7 @@
struct __is_val_expr<valarray<_Tp> > : true_type {};
template<class _Tp>
-class valarray
+class _LIBCPP_VISIBLE valarray
{
public:
typedef _Tp value_type;
@@ -790,6 +790,7 @@
public:
// construct/destroy:
+ _LIBCPP_INLINE_VISIBILITY
valarray() : __begin_(0), __end_(0) {}
explicit valarray(size_t __n);
valarray(const value_type& __x, size_t __n);
@@ -818,10 +819,10 @@
valarray& operator=(const indirect_array<value_type>& __ia);
// element access:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
const value_type& operator[](size_t __i) const {return __begin_[__i];}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
value_type& operator[](size_t __i) {return __begin_[__i];}
// subset operations:
@@ -947,7 +948,7 @@
// member functions:
void swap(valarray& __v);
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __end_ - __begin_;}
value_type sum() const;
@@ -961,12 +962,12 @@
void resize(size_t __n, value_type __x = value_type());
private:
- template <class> friend class valarray;
- template <class> friend class slice_array;
- template <class> friend class gslice_array;
- template <class> friend class mask_array;
+ template <class> friend class _LIBCPP_VISIBLE valarray;
+ template <class> friend class _LIBCPP_VISIBLE slice_array;
+ template <class> friend class _LIBCPP_VISIBLE gslice_array;
+ template <class> friend class _LIBCPP_VISIBLE mask_array;
template <class> friend class __mask_expr;
- template <class> friend class indirect_array;
+ template <class> friend class _LIBCPP_VISIBLE indirect_array;
template <class> friend class __indirect_expr;
template <class> friend class __val_expr;
@@ -1000,13 +1001,13 @@
_Op __op_;
const valarray<_Tp>& __a0_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_UnaryOp(const _Op& __op, const valarray<_Tp>& __a0) : __op_(__op), __a0_(__a0) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const {return __op_(__a0_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
@@ -1020,14 +1021,14 @@
const valarray<_Tp>& __a0_;
_A1 __a1_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_BinaryOp(const _Op& __op, const valarray<_Tp>& __a0, const _A1& __a1)
: __op_(__op), __a0_(__a0), __a1_(__a1) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
value_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
@@ -1041,14 +1042,14 @@
_A0 __a0_;
const valarray<_Tp>& __a1_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_BinaryOp(const _Op& __op, const _A0& __a0, const valarray<_Tp>& __a1)
: __op_(__op), __a0_(__a0), __a1_(__a1) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
value_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
@@ -1062,21 +1063,21 @@
const valarray<_Tp>& __a0_;
const valarray<_Tp>& __a1_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_BinaryOp(const _Op& __op, const valarray<_Tp>& __a0, const valarray<_Tp>& __a1)
: __op_(__op), __a0_(__a0), __a1_(__a1) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
value_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __a0_.size();}
};
// slice_array
template <class _Tp>
-class slice_array
+class _LIBCPP_VISIBLE slice_array
{
public:
typedef _Tp value_type;
@@ -1180,6 +1181,7 @@
void operator=(const value_type& __x) const;
private:
+ _LIBCPP_INLINE_VISIBILITY
slice_array(const slice& __sl, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_ + __sl.start())),
__size_(__sl.size()),
@@ -1191,7 +1193,7 @@
};
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const slice_array<_Tp>&
slice_array<_Tp>::operator=(const slice_array& __sa) const
{
@@ -1203,7 +1205,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1218,7 +1220,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1233,7 +1235,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1248,7 +1250,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1263,7 +1265,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1278,7 +1280,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1293,7 +1295,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1308,7 +1310,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1323,7 +1325,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1338,7 +1340,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1353,7 +1355,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1367,7 +1369,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
slice_array<_Tp>::operator=(const value_type& __x) const
{
@@ -1378,17 +1380,17 @@
// gslice
-class gslice
+class _LIBCPP_VISIBLE gslice
{
valarray<size_t> __size_;
valarray<size_t> __stride_;
valarray<size_t> __1d_;
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice() {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, const valarray<size_t>& __size,
const valarray<size_t>& __stride)
: __size_(__size),
@@ -1397,21 +1399,21 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, const valarray<size_t>& __size,
valarray<size_t>&& __stride)
: __size_(__size),
__stride_(move(__stride))
{__init(__start);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, valarray<size_t>&& __size,
const valarray<size_t>& __stride)
: __size_(move(__size)),
__stride_(__stride)
{__init(__start);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, valarray<size_t>&& __size,
valarray<size_t>&& __stride)
: __size_(move(__size)),
@@ -1425,13 +1427,13 @@
// gslice& operator=(const gslice&) = default;
// gslice& operator=(gslice&&) = default;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t start() const {return __1d_.size() ? __1d_[0] : 0;}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
valarray<size_t> size() const {return __size_;}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
valarray<size_t> stride() const {return __stride_;}
private:
@@ -1445,7 +1447,7 @@
// gslice_array
template <class _Tp>
-class gslice_array
+class _LIBCPP_VISIBLE gslice_array
{
public:
typedef _Tp value_type;
@@ -1553,7 +1555,7 @@
// gslice_array& operator=(gslice_array&&) = default;
private:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice_array(const gslice& __gs, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
__1d_(__gs.__1d_)
@@ -1561,7 +1563,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
__1d_(move(__gs.__1d_))
@@ -1574,7 +1576,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1590,7 +1592,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1606,7 +1608,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1622,7 +1624,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1638,7 +1640,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1654,7 +1656,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1670,7 +1672,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1686,7 +1688,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1702,7 +1704,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1718,7 +1720,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1734,7 +1736,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1749,7 +1751,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const gslice_array<_Tp>&
gslice_array<_Tp>::operator=(const gslice_array& __ga) const
{
@@ -1762,7 +1764,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
gslice_array<_Tp>::operator=(const value_type& __x) const
{
@@ -1774,7 +1776,7 @@
// mask_array
template <class _Tp>
-class mask_array
+class _LIBCPP_VISIBLE mask_array
{
public:
typedef _Tp value_type;
@@ -1882,7 +1884,7 @@
// mask_array& operator=(mask_array&&) = default;
private:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
mask_array(const valarray<bool>& __vb, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
__1d_(count(__vb.__begin_, __vb.__end_, true))
@@ -1898,7 +1900,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1913,7 +1915,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1928,7 +1930,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1943,7 +1945,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1958,7 +1960,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1973,7 +1975,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -1988,7 +1990,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2003,7 +2005,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2018,7 +2020,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2033,7 +2035,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2048,7 +2050,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2062,7 +2064,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const mask_array<_Tp>&
mask_array<_Tp>::operator=(const mask_array& __ma) const
{
@@ -2072,7 +2074,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
mask_array<_Tp>::operator=(const value_type& __x) const
{
@@ -2093,7 +2095,7 @@
_ValExpr __expr_;
valarray<size_t> __1d_;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__mask_expr(const valarray<bool>& __vb, const _RmExpr& __e)
: __expr_(__e),
__1d_(count(__vb.__begin_, __vb.__end_, true))
@@ -2105,11 +2107,11 @@
}
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const
{return __expr_[__1d_[__i]];}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __1d_.size();}
template <class> friend class valarray;
@@ -2118,7 +2120,7 @@
// indirect_array
template <class _Tp>
-class indirect_array
+class _LIBCPP_VISIBLE indirect_array
{
public:
typedef _Tp value_type;
@@ -2226,7 +2228,7 @@
// indirect_array& operator=(indirect_array&&) = default;
private:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
indirect_array(const valarray<size_t>& __ia, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
__1d_(__ia)
@@ -2234,7 +2236,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
__1d_(move(__ia))
@@ -2247,7 +2249,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2262,7 +2264,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2277,7 +2279,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2292,7 +2294,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2307,7 +2309,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2322,7 +2324,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2337,7 +2339,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2352,7 +2354,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2367,7 +2369,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2382,7 +2384,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2397,7 +2399,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -2411,7 +2413,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const indirect_array<_Tp>&
indirect_array<_Tp>::operator=(const indirect_array& __ia) const
{
@@ -2424,7 +2426,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
indirect_array<_Tp>::operator=(const value_type& __x) const
{
@@ -2445,6 +2447,7 @@
_ValExpr __expr_;
valarray<size_t> __1d_;
+ _LIBCPP_INLINE_VISIBILITY
__indirect_expr(const valarray<size_t>& __ia, const _RmExpr& __e)
: __expr_(__e),
__1d_(__ia)
@@ -2452,6 +2455,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
: __expr_(__e),
__1d_(move(__ia))
@@ -2460,14 +2464,14 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
public:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const
{return __expr_[__1d_[__i]];}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __1d_.size();}
- template <class> friend class valarray;
+ template <class> friend class _LIBCPP_VISIBLE valarray;
};
template<class _ValExpr>
@@ -2480,30 +2484,30 @@
typedef typename _RmExpr::value_type value_type;
typedef typename _RmExpr::result_type result_type;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
explicit __val_expr(const _RmExpr& __e) : __expr_(__e) {}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type operator[](size_t __i) const
{return __expr_[__i];}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__slice_expr<_ValExpr> > operator[](slice __s) const
{return __val_expr<__slice_expr<_ValExpr> >(__expr_, __s);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<_ValExpr> > operator[](const gslice& __gs) const
{return __val_expr<__indirect_expr<_ValExpr> >(__expr_, __gs.__1d_);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__mask_expr<_ValExpr> > operator[](const valarray<bool>& __vb) const
{return __val_expr<__mask_expr<_ValExpr> >(__expr_, __vb);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<_ValExpr> > operator[](const valarray<size_t>& __vs) const
{return __val_expr<__indirect_expr<_ValExpr> >(__expr_, __vs);}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<__unary_plus<value_type>, _ValExpr> >
operator+() const
{
@@ -2511,7 +2515,7 @@
return __val_expr<_NewExpr>(_NewExpr(__unary_plus<value_type>(), __expr_));
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<negate<value_type>, _ValExpr> >
operator-() const
{
@@ -2519,7 +2523,7 @@
return __val_expr<_NewExpr>(_NewExpr(negate<value_type>(), __expr_));
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<__bit_not<value_type>, _ValExpr> >
operator~() const
{
@@ -2527,7 +2531,7 @@
return __val_expr<_NewExpr>(_NewExpr(__bit_not<value_type>(), __expr_));
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<logical_not<value_type>, _ValExpr> >
operator!() const
{
@@ -2537,10 +2541,10 @@
operator valarray<result_type>() const;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
size_t size() const {return __expr_.size();}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type sum() const
{
size_t __n = __expr_.size();
@@ -2550,7 +2554,7 @@
return __r;
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type min() const
{
size_t __n = size();
@@ -2564,7 +2568,7 @@
return __r;
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
result_type max() const
{
size_t __n = size();
@@ -2578,15 +2582,15 @@
return __r;
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__shift_expr<_ValExpr> > shift (int __i) const
{return __val_expr<__shift_expr<_ValExpr> >(__shift_expr<_ValExpr>(__i, __expr_));}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<__cshift_expr<_ValExpr> > cshift(int __i) const
{return __val_expr<__cshift_expr<_ValExpr> >(__cshift_expr<_ValExpr>(__i, __expr_));}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<__apply_expr<value_type, value_type(*)(value_type)>, _ValExpr> >
apply(value_type __f(value_type)) const
{
@@ -2595,7 +2599,7 @@
return __val_expr<_NewExpr>(_NewExpr(_Op(__f), __expr_));
}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
__val_expr<_UnaryOp<__apply_expr<value_type, value_type(*)(const value_type&)>, _ValExpr> >
apply(value_type __f(const value_type&)) const
{
@@ -2624,7 +2628,7 @@
// valarray
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>::valarray(size_t __n)
: __begin_(0),
__end_(0)
@@ -2633,7 +2637,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>::valarray(const value_type& __x, size_t __n)
: __begin_(0),
__end_(0)
@@ -2694,7 +2698,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>::valarray(valarray&& __v)
: __begin_(__v.__begin_),
__end_(__v.__end_)
@@ -2844,7 +2848,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>::~valarray()
{
resize(0);
@@ -2866,7 +2870,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(valarray&& __v)
{
@@ -2879,7 +2883,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(initializer_list<value_type> __il)
{
@@ -2892,7 +2896,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(const value_type& __x)
{
@@ -2901,7 +2905,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(const slice_array<value_type>& __sa)
{
@@ -2913,7 +2917,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(const gslice_array<value_type>& __ga)
{
@@ -2927,7 +2931,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(const mask_array<value_type>& __ma)
{
@@ -2941,7 +2945,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator=(const indirect_array<value_type>& __ia)
{
@@ -2955,7 +2959,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__slice_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](slice __s) const
{
@@ -2963,7 +2967,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
slice_array<_Tp>
valarray<_Tp>::operator[](slice __s)
{
@@ -2971,7 +2975,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](const gslice& __gs) const
{
@@ -2979,7 +2983,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
gslice_array<_Tp>
valarray<_Tp>::operator[](const gslice& __gs)
{
@@ -2989,7 +2993,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](gslice&& __gs) const
{
@@ -2997,7 +3001,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
gslice_array<_Tp>
valarray<_Tp>::operator[](gslice&& __gs)
{
@@ -3007,7 +3011,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__mask_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](const valarray<bool>& __vb) const
{
@@ -3015,7 +3019,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
mask_array<_Tp>
valarray<_Tp>::operator[](const valarray<bool>& __vb)
{
@@ -3025,7 +3029,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__mask_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](valarray<bool>&& __vb) const
{
@@ -3033,7 +3037,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
mask_array<_Tp>
valarray<_Tp>::operator[](valarray<bool>&& __vb)
{
@@ -3043,7 +3047,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](const valarray<size_t>& __vs) const
{
@@ -3051,7 +3055,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
indirect_array<_Tp>
valarray<_Tp>::operator[](const valarray<size_t>& __vs)
{
@@ -3061,7 +3065,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](valarray<size_t>&& __vs) const
{
@@ -3069,7 +3073,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
indirect_array<_Tp>
valarray<_Tp>::operator[](valarray<size_t>&& __vs)
{
@@ -3147,7 +3151,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator*=(const value_type& __x)
{
@@ -3157,7 +3161,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator/=(const value_type& __x)
{
@@ -3167,7 +3171,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator%=(const value_type& __x)
{
@@ -3177,7 +3181,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator+=(const value_type& __x)
{
@@ -3187,7 +3191,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator-=(const value_type& __x)
{
@@ -3197,7 +3201,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator^=(const value_type& __x)
{
@@ -3207,7 +3211,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator&=(const value_type& __x)
{
@@ -3217,7 +3221,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator|=(const value_type& __x)
{
@@ -3227,7 +3231,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator<<=(const value_type& __x)
{
@@ -3237,7 +3241,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
valarray<_Tp>&
valarray<_Tp>::operator>>=(const value_type& __x)
{
@@ -3248,7 +3252,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3264,7 +3268,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3280,7 +3284,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3296,7 +3300,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3312,7 +3316,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3328,7 +3332,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3344,7 +3348,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3360,7 +3364,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3376,7 +3380,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3392,7 +3396,7 @@
template <class _Tp>
template <class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3407,7 +3411,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
valarray<_Tp>::swap(valarray& __v)
{
@@ -3416,7 +3420,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
_Tp
valarray<_Tp>::sum() const
{
@@ -3430,7 +3434,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
_Tp
valarray<_Tp>::min() const
{
@@ -3440,7 +3444,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
_Tp
valarray<_Tp>::max() const
{
@@ -3574,7 +3578,7 @@
}
template<class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(valarray<_Tp>& __x, valarray<_Tp>& __y)
{
@@ -3582,7 +3586,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3596,7 +3600,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3612,7 +3616,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3628,7 +3632,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3642,7 +3646,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3658,7 +3662,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3674,7 +3678,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3688,7 +3692,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3704,7 +3708,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3720,7 +3724,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3734,7 +3738,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3750,7 +3754,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3766,7 +3770,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3780,7 +3784,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3796,7 +3800,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3812,7 +3816,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3826,7 +3830,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3842,7 +3846,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3858,7 +3862,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3872,7 +3876,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3888,7 +3892,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3904,7 +3908,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3918,7 +3922,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3934,7 +3938,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3950,7 +3954,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3964,7 +3968,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3980,7 +3984,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -3996,7 +4000,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4010,7 +4014,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4026,7 +4030,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4042,7 +4046,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4056,7 +4060,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4072,7 +4076,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4088,7 +4092,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4102,7 +4106,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4118,7 +4122,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4134,7 +4138,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4148,7 +4152,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4164,7 +4168,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4180,7 +4184,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4194,7 +4198,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4210,7 +4214,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4226,7 +4230,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4240,7 +4244,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4256,7 +4260,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4272,7 +4276,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4286,7 +4290,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4302,7 +4306,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4318,7 +4322,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4332,7 +4336,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4348,7 +4352,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4364,7 +4368,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4378,7 +4382,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4394,7 +4398,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4410,7 +4414,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4424,7 +4428,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4438,7 +4442,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4452,7 +4456,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4466,7 +4470,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4480,7 +4484,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4496,7 +4500,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4512,7 +4516,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4526,7 +4530,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4540,7 +4544,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4554,7 +4558,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4568,7 +4572,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4582,7 +4586,7 @@
}
template<class _Expr1, class _Expr2>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4596,7 +4600,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4612,7 +4616,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4628,7 +4632,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4642,7 +4646,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4656,7 +4660,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4670,7 +4674,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4684,7 +4688,7 @@
}
template<class _Expr>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_val_expr<_Expr>::value,
@@ -4698,7 +4702,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
_Tp*
begin(valarray<_Tp>& __v)
{
@@ -4706,7 +4710,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const _Tp*
begin(const valarray<_Tp>& __v)
{
@@ -4714,7 +4718,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
_Tp*
end(valarray<_Tp>& __v)
{
@@ -4722,7 +4726,7 @@
}
template <class _Tp>
-inline _LIBCPP_ALWAYS_INLINE
+inline _LIBCPP_INLINE_VISIBILITY
const _Tp*
end(const valarray<_Tp>& __v)
{
Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=114685&r1=114684&r2=114685&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Thu Sep 23 13:58:28 2010
@@ -330,18 +330,22 @@
void __destruct_at_end(const_pointer __new_last, false_type);
void __destruct_at_end(const_pointer __new_last, true_type);
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const __vector_base& __c)
{__copy_assign_alloc(__c, integral_constant<bool,
__alloc_traits::propagate_on_container_copy_assignment::value>());}
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__vector_base& __c)
{__move_assign_alloc(__c, integral_constant<bool,
__alloc_traits::propagate_on_container_move_assignment::value>());}
+ _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>());}
private:
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const __vector_base& __c, true_type)
{
if (__alloc() != __c.__alloc())
@@ -353,22 +357,27 @@
__alloc() = __c.__alloc();
}
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const __vector_base& __c, false_type)
{}
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(const __vector_base& __c, true_type)
{
__alloc() = _STD::move(__c.__alloc());
}
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(const __vector_base& __c, false_type)
{}
+ _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)
{}
};
@@ -478,6 +487,7 @@
vector(initializer_list<value_type> __il);
vector(initializer_list<value_type> __il, const allocator_type& __a);
#ifdef _LIBCPP_DEBUG
+ _LIBCPP_INLINE_VISIBILITY
~vector() {__invalidate_all_iterators();}
#endif
@@ -489,6 +499,7 @@
vector(vector&& __x, const allocator_type& __a);
vector& operator=(vector&& __x);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
@@ -509,6 +520,7 @@
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const_reference __u);
+ _LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
@@ -585,6 +597,7 @@
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
@@ -1776,6 +1789,7 @@
vector(vector&& __v, const allocator_type& __a);
vector& operator=(vector&& __v);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ _LIBCPP_INLINE_VISIBILITY
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
@@ -1796,6 +1810,7 @@
assign(_ForwardIterator __first, _ForwardIterator __last);
void assign(size_type __n, const value_type& __x);
+ _LIBCPP_INLINE_VISIBILITY
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
@@ -1855,6 +1870,7 @@
iterator
>::type
insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
@@ -1906,9 +1922,11 @@
{return iterator(const_cast<__storage_pointer>(__p.__seg_), __p.__ctz_);}
#endif // _LIBCPP_DEBUG
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const vector& __v)
{__copy_assign_alloc(__v, integral_constant<bool,
__storage_traits::propagate_on_container_copy_assignment::value>());}
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const vector& __c, true_type)
{
if (__alloc() != __c.__alloc())
@@ -1916,31 +1934,38 @@
__alloc() = __c.__alloc();
}
+ _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const vector& __c, false_type)
{}
void __move_assign(vector& __c, false_type);
void __move_assign(vector& __c, true_type);
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(vector& __c)
{__move_assign_alloc(__c, integral_constant<bool,
__storage_traits::propagate_on_container_move_assignment::value>());}
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(const vector& __c, true_type)
{
__alloc() = _STD::move(__c.__alloc());
}
+ _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(const vector& __c, false_type)
{}
+ _LIBCPP_INLINE_VISIBILITY
static void __swap_alloc(__storage_allocator& __x, __storage_allocator& __y)
{__swap_alloc(__x, __y, integral_constant<bool,
__storage_traits::propagate_on_container_swap::value>());}
+ _LIBCPP_INLINE_VISIBILITY
static void __swap_alloc(__storage_allocator& __x, __storage_allocator& __y, true_type)
{
using _STD::swap;
swap(__x, __y);
}
+ _LIBCPP_INLINE_VISIBILITY
static void __swap_alloc(__storage_allocator& __x, __storage_allocator& __y, false_type)
{}
@@ -1951,7 +1976,7 @@
friend class __bit_iterator<vector, false>;
friend class __bit_iterator<vector, true>;
friend class __bit_array<vector>;
- friend struct hash<vector>;
+ friend struct _LIBCPP_VISIBLE hash<vector>;
};
template <class _Allocator>
@@ -2722,9 +2747,10 @@
}
template <class _Allocator>
-struct hash<vector<bool, _Allocator> >
+struct _LIBCPP_VISIBLE hash<vector<bool, _Allocator> >
: public unary_function<vector<bool, _Allocator>, size_t>
{
+ _LIBCPP_INLINE_VISIBILITY
size_t operator()(const vector<bool, _Allocator>& __vec) const
{return __vec.__hash_code();}
};
More information about the cfe-commits
mailing list