@@ -72,9 +72,6 @@ struct _LIBCPP_TEMPLATE_VIS pair
72
72
return *this ;
73
73
}
74
74
#else
75
- template <bool _Val>
76
- using _EnableB _LIBCPP_NODEBUG_TYPE = typename enable_if<_Val, bool >::type;
77
-
78
75
struct _CheckArgs {
79
76
template <int &...>
80
77
static constexpr bool __enable_explicit_default () {
@@ -136,105 +133,105 @@ struct _LIBCPP_TEMPLATE_VIS pair
136
133
__check_tuple_constructor_fail
137
134
>::type;
138
135
139
- template <bool _Dummy = true , _EnableB <
136
+ template <bool _Dummy = true , typename enable_if <
140
137
_CheckArgsDep<_Dummy>::__enable_explicit_default()
141
- > = false >
138
+ >::type* = nullptr >
142
139
explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
143
140
pair () _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
144
141
is_nothrow_default_constructible<second_type>::value)
145
142
: first(), second() {}
146
143
147
- template <bool _Dummy = true , _EnableB <
144
+ template <bool _Dummy = true , typename enable_if <
148
145
_CheckArgsDep<_Dummy>::__enable_implicit_default()
149
- > = false >
146
+ >::type* = nullptr >
150
147
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
151
148
pair () _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
152
149
is_nothrow_default_constructible<second_type>::value)
153
150
: first(), second() {}
154
151
155
- template <bool _Dummy = true , _EnableB <
152
+ template <bool _Dummy = true , typename enable_if <
156
153
_CheckArgsDep<_Dummy>::template __enable_explicit<_T1 const &, _T2 const &>()
157
- > = false >
154
+ >::type* = nullptr >
158
155
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
159
156
explicit pair (_T1 const & __t1, _T2 const & __t2)
160
157
_NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
161
158
is_nothrow_copy_constructible<second_type>::value)
162
159
: first(__t1), second(__t2) {}
163
160
164
- template <bool _Dummy = true , _EnableB <
161
+ template <bool _Dummy = true , typename enable_if <
165
162
_CheckArgsDep<_Dummy>::template __enable_implicit<_T1 const &, _T2 const &>()
166
- > = false >
163
+ >::type* = nullptr >
167
164
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
168
165
pair (_T1 const & __t1, _T2 const & __t2)
169
166
_NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
170
167
is_nothrow_copy_constructible<second_type>::value)
171
168
: first(__t1), second(__t2) {}
172
169
173
- template <class _U1 , class _U2 , _EnableB <
170
+ template <class _U1 , class _U2 , typename enable_if <
174
171
_CheckArgs::template __enable_explicit<_U1, _U2>()
175
- > = false >
172
+ >::type* = nullptr >
176
173
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
177
174
explicit pair (_U1&& __u1, _U2&& __u2)
178
175
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
179
176
is_nothrow_constructible<second_type, _U2>::value))
180
177
: first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
181
178
182
- template <class _U1 , class _U2 , _EnableB <
179
+ template <class _U1 , class _U2 , typename enable_if <
183
180
_CheckArgs::template __enable_implicit<_U1, _U2>()
184
- > = false >
181
+ >::type* = nullptr >
185
182
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
186
183
pair (_U1&& __u1, _U2&& __u2)
187
184
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
188
185
is_nothrow_constructible<second_type, _U2>::value))
189
186
: first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
190
187
191
- template <class _U1 , class _U2 , _EnableB <
188
+ template <class _U1 , class _U2 , typename enable_if <
192
189
_CheckArgs::template __enable_explicit<_U1 const &, _U2 const &>()
193
- > = false >
190
+ >::type* = nullptr >
194
191
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
195
192
explicit pair (pair<_U1, _U2> const & __p)
196
193
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const &>::value &&
197
194
is_nothrow_constructible<second_type, _U2 const &>::value))
198
195
: first(__p.first), second(__p.second) {}
199
196
200
- template <class _U1 , class _U2 , _EnableB <
197
+ template <class _U1 , class _U2 , typename enable_if <
201
198
_CheckArgs::template __enable_implicit<_U1 const &, _U2 const &>()
202
- > = false >
199
+ >::type* = nullptr >
203
200
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
204
201
pair (pair<_U1, _U2> const & __p)
205
202
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const &>::value &&
206
203
is_nothrow_constructible<second_type, _U2 const &>::value))
207
204
: first(__p.first), second(__p.second) {}
208
205
209
- template <class _U1 , class _U2 , _EnableB <
206
+ template <class _U1 , class _U2 , typename enable_if <
210
207
_CheckArgs::template __enable_explicit<_U1, _U2>()
211
- > = false >
208
+ >::type* = nullptr >
212
209
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
213
210
explicit pair (pair<_U1, _U2>&&__p)
214
211
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
215
212
is_nothrow_constructible<second_type, _U2&&>::value))
216
213
: first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}
217
214
218
- template <class _U1 , class _U2 , _EnableB <
215
+ template <class _U1 , class _U2 , typename enable_if <
219
216
_CheckArgs::template __enable_implicit<_U1, _U2>()
220
- > = false >
217
+ >::type* = nullptr >
221
218
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
222
219
pair (pair<_U1, _U2>&& __p)
223
220
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
224
221
is_nothrow_constructible<second_type, _U2&&>::value))
225
222
: first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}
226
223
227
- template <class _Tuple , _EnableB <
224
+ template <class _Tuple , typename enable_if <
228
225
_CheckTLC<_Tuple>::template __enable_explicit<_Tuple>()
229
- > = false >
226
+ >::type* = nullptr >
230
227
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
231
228
explicit pair (_Tuple&& __p)
232
229
: first(_VSTD::get<0 >(_VSTD::forward<_Tuple>(__p))),
233
230
second(_VSTD::get<1 >(_VSTD::forward<_Tuple>(__p))) {}
234
231
235
- template <class _Tuple , _EnableB <
232
+ template <class _Tuple , typename enable_if <
236
233
_CheckTLC<_Tuple>::template __enable_implicit<_Tuple>()
237
- > = false >
234
+ >::type* = nullptr >
238
235
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
239
236
pair (_Tuple&& __p)
240
237
: first(_VSTD::get<0 >(_VSTD::forward<_Tuple>(__p))),
@@ -276,9 +273,9 @@ struct _LIBCPP_TEMPLATE_VIS pair
276
273
return *this ;
277
274
}
278
275
279
- template <class _Tuple , _EnableB <
276
+ template <class _Tuple , typename enable_if <
280
277
_CheckTLC<_Tuple>::template __enable_assign<_Tuple>()
281
- > = false >
278
+ >::type* = nullptr >
282
279
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
283
280
pair& operator =(_Tuple&& __p) {
284
281
first = _VSTD::get<0 >(_VSTD::forward<_Tuple>(__p));
0 commit comments