From: Louis Dionne Date: Sat, 11 Feb 2023 17:17:14 +0000 (-0800) Subject: [libc++][NFC] Use std:: instead of _VSTD:: in pair.h X-Git-Tag: upstream/17.0.6~17842 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a98936d5a6982b4d92801bacbf524d0af2fc7674;p=platform%2Fupstream%2Fllvm.git [libc++][NFC] Use std:: instead of _VSTD:: in pair.h --- diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h index 36897e6..3ff71bf 100644 --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -205,7 +205,7 @@ struct _LIBCPP_TEMPLATE_VIS pair explicit pair(_U1&& __u1, _U2&& __u2) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {} + : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {} template < #if _LIBCPP_STD_VER >= 23 // http://wg21.link/P1951 @@ -219,7 +219,7 @@ struct _LIBCPP_TEMPLATE_VIS pair pair(_U1&& __u1, _U2&& __u2) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {} + : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {} #if _LIBCPP_STD_VER >= 23 template&&__p) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} + : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {} template() @@ -266,7 +266,7 @@ struct _LIBCPP_TEMPLATE_VIS pair pair(pair<_U1, _U2>&& __p) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} + : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {} #if _LIBCPP_STD_VER >= 23 template::type* = nullptr> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit pair(_Tuple&& __p) - : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))), - second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {} + : first(std::get<0>(std::forward<_Tuple>(__p))), + second(std::get<1>(std::forward<_Tuple>(__p))) {} template::template __enable_implicit<_Tuple>() >::type* = nullptr> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair(_Tuple&& __p) - : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))), - second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {} + : first(std::get<0>(std::forward<_Tuple>(__p))), + second(std::get<1>(std::forward<_Tuple>(__p))) {} template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 @@ -327,8 +327,8 @@ struct _LIBCPP_TEMPLATE_VIS pair _NOEXCEPT_(is_nothrow_move_assignable::value && is_nothrow_move_assignable::value) { - first = _VSTD::forward(__p.first); - second = _VSTD::forward(__p.second); + first = std::forward(__p.first); + second = std::forward(__p.second); return *this; } @@ -381,8 +381,8 @@ struct _LIBCPP_TEMPLATE_VIS pair >::type* = nullptr> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(_Tuple&& __p) { - first = _VSTD::get<0>(_VSTD::forward<_Tuple>(__p)); - second = _VSTD::get<1>(_VSTD::forward<_Tuple>(__p)); + first = std::get<0>(std::forward<_Tuple>(__p)); + second = std::get<1>(std::forward<_Tuple>(__p)); return *this; } #endif // _LIBCPP_CXX03_LANG @@ -392,7 +392,7 @@ struct _LIBCPP_TEMPLATE_VIS pair swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) { - using _VSTD::swap; + using std::swap; swap(first, __p.first); swap(second, __p.second); } @@ -443,10 +443,10 @@ common_comparison_category_t< __synth_three_way_result<_T2> > operator<=>(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y) { - if (auto __c = _VSTD::__synth_three_way(__x.first, __y.first); __c != 0) { + if (auto __c = std::__synth_three_way(__x.first, __y.first); __c != 0) { return __c; } - return _VSTD::__synth_three_way(__x.second, __y.second); + return std::__synth_three_way(__x.second, __y.second); } #else // _LIBCPP_STD_VER >= 20 @@ -542,7 +542,7 @@ pair::type, typename __unwrap_ref_decay<_T2>::t make_pair(_T1&& __t1, _T2&& __t2) { return pair::type, typename __unwrap_ref_decay<_T2>::type> - (_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2)); + (std::forward<_T1>(__t1), std::forward<_T2>(__t2)); } template @@ -588,13 +588,13 @@ struct __get_pair<0> static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T1&& - get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T1>(__p.first);} + get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T1>(__p.first);} template static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T1&& - get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward(__p.first);} + get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward(__p.first);} }; template <> @@ -616,13 +616,13 @@ struct __get_pair<1> static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _T2&& - get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T2>(__p.second);} + get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T2>(__p.second);} template static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _T2&& - get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward(__p.second);} + get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward(__p.second);} }; template @@ -646,7 +646,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<_Ip>::get(_VSTD::move(__p)); + return __get_pair<_Ip>::get(std::move(__p)); } template @@ -654,7 +654,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<_Ip>::get(_VSTD::move(__p)); + return __get_pair<_Ip>::get(std::move(__p)); } #if _LIBCPP_STD_VER > 11 @@ -676,14 +676,14 @@ template inline _LIBCPP_HIDE_FROM_ABI constexpr _T1 && get(pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<0>::get(_VSTD::move(__p)); + return __get_pair<0>::get(std::move(__p)); } template inline _LIBCPP_HIDE_FROM_ABI constexpr _T1 const && get(pair<_T1, _T2> const&& __p) _NOEXCEPT { - return __get_pair<0>::get(_VSTD::move(__p)); + return __get_pair<0>::get(std::move(__p)); } template @@ -704,14 +704,14 @@ template inline _LIBCPP_HIDE_FROM_ABI constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT { - return __get_pair<1>::get(_VSTD::move(__p)); + return __get_pair<1>::get(std::move(__p)); } template inline _LIBCPP_HIDE_FROM_ABI constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT { - return __get_pair<1>::get(_VSTD::move(__p)); + return __get_pair<1>::get(std::move(__p)); } #endif // _LIBCPP_STD_VER > 11