Skip to content

Commit d4df484

Browse files
committed
Revert some changes
1 parent 90199e4 commit d4df484

File tree

2 files changed

+42
-191
lines changed

2 files changed

+42
-191
lines changed

libcxx/include/__functional/operations.h

Lines changed: 42 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ template <class _Tp>
3535
#endif
3636
struct plus : __binary_function<_Tp, _Tp, _Tp> {
3737
typedef _Tp __result_type; // used by valarray
38-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
39-
operator()(const _Tp& __x, const _Tp& __y) const {
38+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
4039
return __x + __y;
4140
}
4241
};
@@ -54,7 +53,7 @@ inline const bool __desugars_to_v<__plus_tag, plus<void>, _Tp, _Up> = true;
5453
template <>
5554
struct plus<void> {
5655
template <class _T1, class _T2>
57-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
56+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
5857
noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u))) //
5958
-> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
6059
return std::forward<_T1>(__t) + std::forward<_T2>(__u);
@@ -70,8 +69,7 @@ template <class _Tp>
7069
#endif
7170
struct minus : __binary_function<_Tp, _Tp, _Tp> {
7271
typedef _Tp __result_type; // used by valarray
73-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
74-
operator()(const _Tp& __x, const _Tp& __y) const {
72+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
7573
return __x - __y;
7674
}
7775
};
@@ -81,7 +79,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
8179
template <>
8280
struct minus<void> {
8381
template <class _T1, class _T2>
84-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
82+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
8583
noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u))) //
8684
-> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
8785
return std::forward<_T1>(__t) - std::forward<_T2>(__u);
@@ -97,8 +95,7 @@ template <class _Tp>
9795
#endif
9896
struct multiplies : __binary_function<_Tp, _Tp, _Tp> {
9997
typedef _Tp __result_type; // used by valarray
100-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
101-
operator()(const _Tp& __x, const _Tp& __y) const {
98+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
10299
return __x * __y;
103100
}
104101
};
@@ -108,7 +105,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
108105
template <>
109106
struct multiplies<void> {
110107
template <class _T1, class _T2>
111-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
108+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
112109
noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u))) //
113110
-> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
114111
return std::forward<_T1>(__t) * std::forward<_T2>(__u);
@@ -124,8 +121,7 @@ template <class _Tp>
124121
#endif
125122
struct divides : __binary_function<_Tp, _Tp, _Tp> {
126123
typedef _Tp __result_type; // used by valarray
127-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
128-
operator()(const _Tp& __x, const _Tp& __y) const {
124+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
129125
return __x / __y;
130126
}
131127
};
@@ -135,7 +131,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
135131
template <>
136132
struct divides<void> {
137133
template <class _T1, class _T2>
138-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
134+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
139135
noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u))) //
140136
-> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
141137
return std::forward<_T1>(__t) / std::forward<_T2>(__u);
@@ -151,8 +147,7 @@ template <class _Tp>
151147
#endif
152148
struct modulus : __binary_function<_Tp, _Tp, _Tp> {
153149
typedef _Tp __result_type; // used by valarray
154-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
155-
operator()(const _Tp& __x, const _Tp& __y) const {
150+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
156151
return __x % __y;
157152
}
158153
};
@@ -162,7 +157,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
162157
template <>
163158
struct modulus<void> {
164159
template <class _T1, class _T2>
165-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
160+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
166161
noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u))) //
167162
-> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
168163
return std::forward<_T1>(__t) % std::forward<_T2>(__u);
@@ -178,17 +173,15 @@ template <class _Tp>
178173
#endif
179174
struct negate : __unary_function<_Tp, _Tp> {
180175
typedef _Tp __result_type; // used by valarray
181-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const {
182-
return -__x;
183-
}
176+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return -__x; }
184177
};
185178
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
186179

187180
#if _LIBCPP_STD_VER >= 14
188181
template <>
189182
struct negate<void> {
190183
template <class _Tp>
191-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
184+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
192185
noexcept(noexcept(-std::forward<_Tp>(__x))) //
193186
-> decltype(-std::forward<_Tp>(__x)) {
194187
return -std::forward<_Tp>(__x);
@@ -206,8 +199,7 @@ template <class _Tp>
206199
#endif
207200
struct bit_and : __binary_function<_Tp, _Tp, _Tp> {
208201
typedef _Tp __result_type; // used by valarray
209-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
210-
operator()(const _Tp& __x, const _Tp& __y) const {
202+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
211203
return __x & __y;
212204
}
213205
};
@@ -217,9 +209,9 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
217209
template <>
218210
struct bit_and<void> {
219211
template <class _T1, class _T2>
220-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
221-
noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
222-
-> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
212+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
213+
noexcept(noexcept(std::forward<_T1>(__t) &
214+
std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
223215
return std::forward<_T1>(__t) & std::forward<_T2>(__u);
224216
}
225217
typedef void is_transparent;
@@ -229,16 +221,14 @@ struct bit_and<void> {
229221
#if _LIBCPP_STD_VER >= 14
230222
template <class _Tp = void>
231223
struct bit_not : __unary_function<_Tp, _Tp> {
232-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const {
233-
return ~__x;
234-
}
224+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return ~__x; }
235225
};
236226
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
237227

238228
template <>
239229
struct bit_not<void> {
240230
template <class _Tp>
241-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
231+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
242232
noexcept(noexcept(~std::forward<_Tp>(__x))) //
243233
-> decltype(~std::forward<_Tp>(__x)) {
244234
return ~std::forward<_Tp>(__x);
@@ -254,8 +244,7 @@ template <class _Tp>
254244
#endif
255245
struct bit_or : __binary_function<_Tp, _Tp, _Tp> {
256246
typedef _Tp __result_type; // used by valarray
257-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
258-
operator()(const _Tp& __x, const _Tp& __y) const {
247+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
259248
return __x | __y;
260249
}
261250
};
@@ -265,7 +254,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
265254
template <>
266255
struct bit_or<void> {
267256
template <class _T1, class _T2>
268-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
257+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
269258
noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u))) //
270259
-> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
271260
return std::forward<_T1>(__t) | std::forward<_T2>(__u);
@@ -281,8 +270,7 @@ template <class _Tp>
281270
#endif
282271
struct bit_xor : __binary_function<_Tp, _Tp, _Tp> {
283272
typedef _Tp __result_type; // used by valarray
284-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
285-
operator()(const _Tp& __x, const _Tp& __y) const {
273+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
286274
return __x ^ __y;
287275
}
288276
};
@@ -292,7 +280,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
292280
template <>
293281
struct bit_xor<void> {
294282
template <class _T1, class _T2>
295-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
283+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
296284
noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u))) //
297285
-> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
298286
return std::forward<_T1>(__t) ^ std::forward<_T2>(__u);
@@ -310,8 +298,7 @@ template <class _Tp>
310298
#endif
311299
struct equal_to : __binary_function<_Tp, _Tp, bool> {
312300
typedef bool __result_type; // used by valarray
313-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
314-
operator()(const _Tp& __x, const _Tp& __y) const {
301+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
315302
return __x == __y;
316303
}
317304
};
@@ -321,7 +308,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
321308
template <>
322309
struct equal_to<void> {
323310
template <class _T1, class _T2>
324-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
311+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
325312
noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u))) //
326313
-> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
327314
return std::forward<_T1>(__t) == std::forward<_T2>(__u);
@@ -346,7 +333,7 @@ template <class _Tp>
346333
#endif
347334
struct not_equal_to : __binary_function<_Tp, _Tp, bool> {
348335
typedef bool __result_type; // used by valarray
349-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
336+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
350337
return __x != __y;
351338
}
352339
};
@@ -356,7 +343,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
356343
template <>
357344
struct not_equal_to<void> {
358345
template <class _T1, class _T2>
359-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
346+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
360347
noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u))) //
361348
-> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
362349
return std::forward<_T1>(__t) != std::forward<_T2>(__u);
@@ -368,8 +355,7 @@ struct not_equal_to<void> {
368355
template <class _Tp>
369356
struct less : __binary_function<_Tp, _Tp, bool> {
370357
typedef bool __result_type; // used by valarray
371-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
372-
operator()(const _Tp& __x, const _Tp& __y) const {
358+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
373359
return __x < __y;
374360
}
375361
};
@@ -385,7 +371,7 @@ inline const bool __desugars_to_v<__totally_ordered_less_tag, less<_Tp>, _Tp, _T
385371
template <>
386372
struct less<void> {
387373
template <class _T1, class _T2>
388-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
374+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
389375
noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u))) //
390376
-> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
391377
return std::forward<_T1>(__t) < std::forward<_T2>(__u);
@@ -415,8 +401,7 @@ template <class _Tp>
415401
#endif
416402
struct less_equal : __binary_function<_Tp, _Tp, bool> {
417403
typedef bool __result_type; // used by valarray
418-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
419-
operator()(const _Tp& __x, const _Tp& __y) const {
404+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
420405
return __x <= __y;
421406
}
422407
};
@@ -426,7 +411,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
426411
template <>
427412
struct less_equal<void> {
428413
template <class _T1, class _T2>
429-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
414+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
430415
noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u))) //
431416
-> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
432417
return std::forward<_T1>(__t) <= std::forward<_T2>(__u);
@@ -442,8 +427,7 @@ template <class _Tp>
442427
#endif
443428
struct greater_equal : __binary_function<_Tp, _Tp, bool> {
444429
typedef bool __result_type; // used by valarray
445-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
446-
operator()(const _Tp& __x, const _Tp& __y) const {
430+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
447431
return __x >= __y;
448432
}
449433
};
@@ -453,9 +437,9 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
453437
template <>
454438
struct greater_equal<void> {
455439
template <class _T1, class _T2>
456-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
457-
noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
458-
-> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
440+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
441+
noexcept(noexcept(std::forward<_T1>(__t) >=
442+
std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
459443
return std::forward<_T1>(__t) >= std::forward<_T2>(__u);
460444
}
461445
typedef void is_transparent;
@@ -469,8 +453,7 @@ template <class _Tp>
469453
#endif
470454
struct greater : __binary_function<_Tp, _Tp, bool> {
471455
typedef bool __result_type; // used by valarray
472-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
473-
operator()(const _Tp& __x, const _Tp& __y) const {
456+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
474457
return __x > __y;
475458
}
476459
};
@@ -483,7 +466,7 @@ inline const bool __desugars_to_v<__greater_tag, greater<_Tp>, _Tp, _Tp> = true;
483466
template <>
484467
struct greater<void> {
485468
template <class _T1, class _T2>
486-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
469+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
487470
noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u))) //
488471
-> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
489472
return std::forward<_T1>(__t) > std::forward<_T2>(__u);
@@ -512,8 +495,7 @@ template <class _Tp>
512495
#endif
513496
struct logical_and : __binary_function<_Tp, _Tp, bool> {
514497
typedef bool __result_type; // used by valarray
515-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
516-
operator()(const _Tp& __x, const _Tp& __y) const {
498+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
517499
return __x && __y;
518500
}
519501
};
@@ -523,7 +505,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
523505
template <>
524506
struct logical_and<void> {
525507
template <class _T1, class _T2>
526-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
508+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
527509
noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u))) //
528510
-> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
529511
return std::forward<_T1>(__t) && std::forward<_T2>(__u);
@@ -539,17 +521,15 @@ template <class _Tp>
539521
#endif
540522
struct logical_not : __unary_function<_Tp, bool> {
541523
typedef bool __result_type; // used by valarray
542-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const {
543-
return !__x;
544-
}
524+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const { return !__x; }
545525
};
546526
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
547527

548528
#if _LIBCPP_STD_VER >= 14
549529
template <>
550530
struct logical_not<void> {
551531
template <class _Tp>
552-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
532+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
553533
noexcept(noexcept(!std::forward<_Tp>(__x))) //
554534
-> decltype(!std::forward<_Tp>(__x)) {
555535
return !std::forward<_Tp>(__x);
@@ -565,8 +545,7 @@ template <class _Tp>
565545
#endif
566546
struct logical_or : __binary_function<_Tp, _Tp, bool> {
567547
typedef bool __result_type; // used by valarray
568-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
569-
operator()(const _Tp& __x, const _Tp& __y) const {
548+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
570549
return __x || __y;
571550
}
572551
};
@@ -576,7 +555,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
576555
template <>
577556
struct logical_or<void> {
578557
template <class _T1, class _T2>
579-
[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
558+
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
580559
noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u))) //
581560
-> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
582561
return std::forward<_T1>(__t) || std::forward<_T2>(__u);

0 commit comments

Comments
 (0)