_STD -> _VSTD to avoid macro clash on windows
llvm-svn: 134190
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: ce48a1137d56d368828d360e5f2a8162bac6517c
diff --git a/include/tuple b/include/tuple
index c075e42..66a0c91 100644
--- a/include/tuple
+++ b/include/tuple
@@ -191,7 +191,7 @@
class = typename enable_if<is_constructible<_Hp, _Tp>::value>::type>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(_Tp&& __t)
- : value(_STD::forward<_Tp>(__t))
+ : value(_VSTD::forward<_Tp>(__t))
{static_assert(!is_reference<_Hp>::value ||
is_lvalue_reference<_Hp>::value &&
(is_lvalue_reference<_Tp>::value ||
@@ -207,7 +207,7 @@
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
- : value(_STD::forward<_Tp>(__t))
+ : value(_VSTD::forward<_Tp>(__t))
{static_assert(!is_lvalue_reference<_Hp>::value ||
is_lvalue_reference<_Hp>::value &&
(is_lvalue_reference<_Tp>::value ||
@@ -221,7 +221,7 @@
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
- : value(allocator_arg_t(), __a, _STD::forward<_Tp>(__t))
+ : value(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t))
{static_assert(!is_lvalue_reference<_Hp>::value ||
is_lvalue_reference<_Hp>::value &&
(is_lvalue_reference<_Tp>::value ||
@@ -235,7 +235,7 @@
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
- : value(_STD::forward<_Tp>(__t), __a)
+ : value(_VSTD::forward<_Tp>(__t), __a)
{static_assert(!is_lvalue_reference<_Hp>::value ||
is_lvalue_reference<_Hp>::value &&
(is_lvalue_reference<_Tp>::value ||
@@ -260,14 +260,14 @@
__tuple_leaf&
operator=(_Tp&& __t)
{
- value = _STD::forward<_Tp>(__t);
+ value = _VSTD::forward<_Tp>(__t);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
{
- _STD::swap(*this, __t);
+ _VSTD::swap(*this, __t);
return 0;
}
@@ -302,22 +302,22 @@
class = typename enable_if<is_constructible<_Hp, _Tp>::value>::type>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(_Tp&& __t)
- : _Hp(_STD::forward<_Tp>(__t)) {}
+ : _Hp(_VSTD::forward<_Tp>(__t)) {}
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
- : _Hp(_STD::forward<_Tp>(__t)) {}
+ : _Hp(_VSTD::forward<_Tp>(__t)) {}
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
- : _Hp(allocator_arg_t(), __a, _STD::forward<_Tp>(__t)) {}
+ : _Hp(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t)) {}
template <class _Tp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
- : _Hp(_STD::forward<_Tp>(__t), __a) {}
+ : _Hp(_VSTD::forward<_Tp>(__t), __a) {}
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
@@ -329,7 +329,7 @@
__tuple_leaf&
operator=(_Tp&& __t)
{
- _Hp::operator=(_STD::forward<_Tp>(__t));
+ _Hp::operator=(_VSTD::forward<_Tp>(__t));
return *this;
}
@@ -337,7 +337,7 @@
int
swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
{
- _STD::swap(*this, __t);
+ _VSTD::swap(*this, __t);
return 0;
}
@@ -378,7 +378,7 @@
__tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
__tuple_indices<_Ul...>, __tuple_types<_Tl...>,
_Up&&... __u) :
- __tuple_leaf<_Uf, _Tf>(_STD::forward<_Up>(__u))...,
+ __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
__tuple_leaf<_Ul, _Tl>()...
{}
@@ -391,7 +391,7 @@
__tuple_indices<_Ul...>, __tuple_types<_Tl...>,
_Up&&... __u) :
__tuple_leaf<_Uf, _Tf>(__uses_alloc_ctor<_Tf, _Alloc, _Up>(), __a,
- _STD::forward<_Up>(__u))...,
+ _VSTD::forward<_Up>(__u))...,
__tuple_leaf<_Ul, _Tl>(__uses_alloc_ctor<_Tl, _Alloc>(), __a)...
{}
@@ -403,8 +403,8 @@
>
_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)))...
+ : __tuple_leaf<_Indx, _Tp>(_VSTD::forward<typename tuple_element<_Indx,
+ typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
{}
template <class _Alloc, class _Tuple,
@@ -417,8 +417,8 @@
__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,
- _STD::forward<typename tuple_element<_Indx,
- typename __make_tuple_types<_Tuple>::type>::type>(_STD::get<_Indx>(__t)))...
+ _VSTD::forward<typename tuple_element<_Indx,
+ typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
{}
template <class _Tuple>
@@ -430,8 +430,8 @@
>::type
operator=(_Tuple&& __t)
{
- __swallow(__tuple_leaf<_Indx, _Tp>::operator=(_STD::forward<typename tuple_element<_Indx,
- typename __make_tuple_types<_Tuple>::type>::type>(_STD::get<_Indx>(__t)))...);
+ __swallow(__tuple_leaf<_Indx, _Tp>::operator=(_VSTD::forward<typename tuple_element<_Indx,
+ typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...);
return *this;
}
@@ -499,7 +499,7 @@
typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
- _STD::forward<_Up>(__u)...) {}
+ _VSTD::forward<_Up>(__u)...) {}
template <class _Alloc, class ..._Up,
class = typename enable_if
@@ -522,7 +522,7 @@
typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
- _STD::forward<_Up>(__u)...) {}
+ _VSTD::forward<_Up>(__u)...) {}
template <class _Tuple,
class = typename enable_if
@@ -532,7 +532,7 @@
>
_LIBCPP_INLINE_VISIBILITY
tuple(_Tuple&& __t)
- : base_(_STD::forward<_Tuple>(__t)) {}
+ : base_(_VSTD::forward<_Tuple>(__t)) {}
template <class _Alloc, class _Tuple,
class = typename enable_if
@@ -542,7 +542,7 @@
>
_LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
- : base_(allocator_arg_t(), __a, _STD::forward<_Tuple>(__t)) {}
+ : base_(allocator_arg_t(), __a, _VSTD::forward<_Tuple>(__t)) {}
template <class _Tuple,
class = typename enable_if
@@ -554,7 +554,7 @@
tuple&
operator=(_Tuple&& __t)
{
- base_.operator=(_STD::forward<_Tuple>(__t));
+ base_.operator=(_VSTD::forward<_Tuple>(__t));
return *this;
}
@@ -676,7 +676,7 @@
tuple<typename __make_tuple_return<_Tp>::type...>
make_tuple(_Tp&&... __t)
{
- return tuple<typename __make_tuple_return<_Tp>::type...>(_STD::forward<_Tp>(__t)...);
+ return tuple<typename __make_tuple_return<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...);
}
template <class... _Tp>
@@ -684,7 +684,7 @@
tuple<_Tp&&...>
forward_as_tuple(_Tp&&... __t)
{
- return tuple<_Tp&&...>(_STD::forward<_Tp>(__t)...);
+ return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
}
template <size_t _I>
@@ -882,8 +882,8 @@
typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
operator()(tuple<_Types...> __t, _Tuple0&& __t0)
{
- return _STD::forward_as_tuple(_STD::forward<_Types>(get<_I0>(__t))...,
- get<_J0>(_STD::forward<_Tuple0>(__t0))...);
+ return _VSTD::forward_as_tuple(_VSTD::forward<_Types>(get<_I0>(__t))...,
+ get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
}
template <class _Tuple0, class _Tuple1, class ..._Tuples>
@@ -897,12 +897,12 @@
tuple<_Types..., typename __apply_cv<_Tuple0, typename tuple_element<_J0, _T0>::type>::type&&...>,
typename __make_tuple_indices<sizeof ...(_Types) + tuple_size<_T0>::value>::type,
typename __make_tuple_indices<tuple_size<_T1>::value>::type>()
- (_STD::forward_as_tuple(
- _STD::forward<_Types>(get<_I0>(__t))...,
- get<_J0>(_STD::forward<_Tuple0>(__t0))...
+ (_VSTD::forward_as_tuple(
+ _VSTD::forward<_Types>(get<_I0>(__t))...,
+ get<_J0>(_VSTD::forward<_Tuple0>(__t0))...
),
- _STD::forward<_Tuple1>(__t1),
- _STD::forward<_Tuples>(__tpls)...);
+ _VSTD::forward<_Tuple1>(__t1),
+ _VSTD::forward<_Tuples>(__tpls)...);
}
};
@@ -914,8 +914,8 @@
typedef typename remove_reference<_Tuple0>::type _T0;
return __tuple_cat<tuple<>, __tuple_indices<>,
typename __make_tuple_indices<tuple_size<_T0>::value>::type>()
- (tuple<>(), _STD::forward<_Tuple0>(__t0),
- _STD::forward<_Tuples>(__tpls)...);
+ (tuple<>(), _VSTD::forward<_Tuple0>(__t0),
+ _VSTD::forward<_Tuples>(__tpls)...);
}
template <class ..._Tp, class _Alloc>
@@ -928,8 +928,8 @@
pair<_T1, _T2>::pair(piecewise_construct_t,
tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
__tuple_indices<_I1...>, __tuple_indices<_I2...>)
- : first(_STD::forward<_Args1>(get<_I1>( __first_args))...),
- second(_STD::forward<_Args2>(get<_I2>(__second_args))...)
+ : first(_VSTD::forward<_Args1>(get<_I1>( __first_args))...),
+ second(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
{
}