Skip to content

Commit bfa8b64

Browse files
authored
[libc++][NFC] Format pair.h (#94101)
1 parent 5d31360 commit bfa8b64

File tree

1 file changed

+19
-18
lines changed
  • libcxx/include/__utility

1 file changed

+19
-18
lines changed

libcxx/include/__utility/pair.h

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ struct _LIBCPP_TEMPLATE_VIS pair
129129
typename conditional< _MaybeEnable, _CheckArgs, __check_tuple_constructor_fail>::type;
130130

131131
template <bool _Dummy = true, __enable_if_t<_CheckArgsDep<_Dummy>::__enable_default(), int> = 0>
132-
explicit(!_CheckArgsDep<_Dummy>::__enable_implicit_default()) _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair()
133-
_NOEXCEPT_(
134-
is_nothrow_default_constructible<first_type>::value&& is_nothrow_default_constructible<second_type>::value)
132+
explicit(!_CheckArgsDep<_Dummy>::__enable_implicit_default()) _LIBCPP_HIDE_FROM_ABI
133+
_LIBCPP_CONSTEXPR pair() _NOEXCEPT_(
134+
is_nothrow_default_constructible<first_type>::value&& is_nothrow_default_constructible<second_type>::value)
135135
: first(), second() {}
136136

137137
template <bool _Dummy = true,
@@ -150,10 +150,10 @@ struct _LIBCPP_TEMPLATE_VIS pair
150150
class _U2,
151151
# endif
152152
__enable_if_t<_CheckArgs::template __is_pair_constructible<_U1, _U2>(), int> = 0 >
153-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>())
154-
pair(_U1&& __u1, _U2&& __u2)
155-
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
156-
is_nothrow_constructible<second_type, _U2>::value))
153+
_LIBCPP_HIDE_FROM_ABI
154+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>()) pair(_U1&& __u1, _U2&& __u2)
155+
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
156+
is_nothrow_constructible<second_type, _U2>::value))
157157
: first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
158158
}
159159

@@ -168,17 +168,18 @@ struct _LIBCPP_TEMPLATE_VIS pair
168168
template <class _U1,
169169
class _U2,
170170
__enable_if_t<_CheckArgs::template __is_pair_constructible<_U1 const&, _U2 const&>(), int> = 0>
171-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(
172-
!_CheckArgs::template __is_implicit<_U1 const&, _U2 const&>()) pair(pair<_U1, _U2> const& __p)
173-
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
174-
is_nothrow_constructible<second_type, _U2 const&>::value))
171+
_LIBCPP_HIDE_FROM_ABI
172+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1 const&, _U2 const&>())
173+
pair(pair<_U1, _U2> const& __p)
174+
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
175+
is_nothrow_constructible<second_type, _U2 const&>::value))
175176
: first(__p.first), second(__p.second) {}
176177

177178
template <class _U1, class _U2, __enable_if_t<_CheckArgs::template __is_pair_constructible<_U1, _U2>(), int> = 0>
178-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>())
179-
pair(pair<_U1, _U2>&& __p)
180-
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
181-
is_nothrow_constructible<second_type, _U2&&>::value))
179+
_LIBCPP_HIDE_FROM_ABI
180+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>()) pair(pair<_U1, _U2>&& __p)
181+
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
182+
is_nothrow_constructible<second_type, _U2&&>::value))
182183
: first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}
183184

184185
# if _LIBCPP_STD_VER >= 23
@@ -528,9 +529,9 @@ swap(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) noexcept(noexcept(__x
528529
#endif
529530

530531
template <class _T1, class _T2>
531-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
532-
pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
533-
make_pair(_T1&& __t1, _T2&& __t2) {
532+
inline _LIBCPP_HIDE_FROM_ABI
533+
_LIBCPP_CONSTEXPR_SINCE_CXX14 pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
534+
make_pair(_T1&& __t1, _T2&& __t2) {
534535
return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>(
535536
std::forward<_T1>(__t1), std::forward<_T2>(__t2));
536537
}

0 commit comments

Comments
 (0)