2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP___CXX03___FUNCTIONAL_OPERATIONS_H
11 #define _LIBCPP___CXX03___FUNCTIONAL_OPERATIONS_H
13 #include <__cxx03/__config>
14 #include <__cxx03/__functional/binary_function.h>
15 #include <__cxx03/__functional/unary_function.h>
16 #include <__cxx03/__type_traits/desugars_to.h>
17 #include <__cxx03/__utility/forward.h>
19 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
20 # pragma GCC system_header
23 _LIBCPP_BEGIN_NAMESPACE_STD
25 // Arithmetic operations
27 #if _LIBCPP_STD_VER >= 14
28 template <class _Tp
= void>
32 struct _LIBCPP_TEMPLATE_VIS plus
: __binary_function
<_Tp
, _Tp
, _Tp
> {
33 typedef _Tp __result_type
; // used by valarray
34 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
38 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus
);
40 // The non-transparent std::plus specialization is only equivalent to a raw plus
41 // operator when we don't perform an implicit conversion when calling it.
43 inline const bool __desugars_to_v
<__plus_tag
, plus
<_Tp
>, _Tp
, _Tp
> = true;
45 template <class _Tp
, class _Up
>
46 inline const bool __desugars_to_v
<__plus_tag
, plus
<void>, _Tp
, _Up
> = true;
48 #if _LIBCPP_STD_VER >= 14
50 struct _LIBCPP_TEMPLATE_VIS plus
<void> {
51 template <class _T1
, class _T2
>
52 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
53 noexcept(noexcept(std::forward
<_T1
>(__t
) + std::forward
<_T2
>(__u
))) //
54 -> decltype(std::forward
<_T1
>(__t
) + std::forward
<_T2
>(__u
)) {
55 return std::forward
<_T1
>(__t
) + std::forward
<_T2
>(__u
);
57 typedef void is_transparent
;
61 #if _LIBCPP_STD_VER >= 14
62 template <class _Tp
= void>
66 struct _LIBCPP_TEMPLATE_VIS minus
: __binary_function
<_Tp
, _Tp
, _Tp
> {
67 typedef _Tp __result_type
; // used by valarray
68 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
72 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus
);
74 #if _LIBCPP_STD_VER >= 14
76 struct _LIBCPP_TEMPLATE_VIS minus
<void> {
77 template <class _T1
, class _T2
>
78 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
79 noexcept(noexcept(std::forward
<_T1
>(__t
) - std::forward
<_T2
>(__u
))) //
80 -> decltype(std::forward
<_T1
>(__t
) - std::forward
<_T2
>(__u
)) {
81 return std::forward
<_T1
>(__t
) - std::forward
<_T2
>(__u
);
83 typedef void is_transparent
;
87 #if _LIBCPP_STD_VER >= 14
88 template <class _Tp
= void>
92 struct _LIBCPP_TEMPLATE_VIS multiplies
: __binary_function
<_Tp
, _Tp
, _Tp
> {
93 typedef _Tp __result_type
; // used by valarray
94 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
98 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies
);
100 #if _LIBCPP_STD_VER >= 14
102 struct _LIBCPP_TEMPLATE_VIS multiplies
<void> {
103 template <class _T1
, class _T2
>
104 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
105 noexcept(noexcept(std::forward
<_T1
>(__t
) * std::forward
<_T2
>(__u
))) //
106 -> decltype(std::forward
<_T1
>(__t
) * std::forward
<_T2
>(__u
)) {
107 return std::forward
<_T1
>(__t
) * std::forward
<_T2
>(__u
);
109 typedef void is_transparent
;
113 #if _LIBCPP_STD_VER >= 14
114 template <class _Tp
= void>
118 struct _LIBCPP_TEMPLATE_VIS divides
: __binary_function
<_Tp
, _Tp
, _Tp
> {
119 typedef _Tp __result_type
; // used by valarray
120 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
124 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides
);
126 #if _LIBCPP_STD_VER >= 14
128 struct _LIBCPP_TEMPLATE_VIS divides
<void> {
129 template <class _T1
, class _T2
>
130 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
131 noexcept(noexcept(std::forward
<_T1
>(__t
) / std::forward
<_T2
>(__u
))) //
132 -> decltype(std::forward
<_T1
>(__t
) / std::forward
<_T2
>(__u
)) {
133 return std::forward
<_T1
>(__t
) / std::forward
<_T2
>(__u
);
135 typedef void is_transparent
;
139 #if _LIBCPP_STD_VER >= 14
140 template <class _Tp
= void>
144 struct _LIBCPP_TEMPLATE_VIS modulus
: __binary_function
<_Tp
, _Tp
, _Tp
> {
145 typedef _Tp __result_type
; // used by valarray
146 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
150 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus
);
152 #if _LIBCPP_STD_VER >= 14
154 struct _LIBCPP_TEMPLATE_VIS modulus
<void> {
155 template <class _T1
, class _T2
>
156 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
157 noexcept(noexcept(std::forward
<_T1
>(__t
) % std::forward
<_T2
>(__u
))) //
158 -> decltype(std::forward
<_T1
>(__t
) % std::forward
<_T2
>(__u
)) {
159 return std::forward
<_T1
>(__t
) % std::forward
<_T2
>(__u
);
161 typedef void is_transparent
;
165 #if _LIBCPP_STD_VER >= 14
166 template <class _Tp
= void>
170 struct _LIBCPP_TEMPLATE_VIS negate
: __unary_function
<_Tp
, _Tp
> {
171 typedef _Tp __result_type
; // used by valarray
172 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
) const { return -__x
; }
174 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate
);
176 #if _LIBCPP_STD_VER >= 14
178 struct _LIBCPP_TEMPLATE_VIS negate
<void> {
180 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_Tp
&& __x
) const
181 noexcept(noexcept(-std::forward
<_Tp
>(__x
))) //
182 -> decltype(-std::forward
<_Tp
>(__x
)) {
183 return -std::forward
<_Tp
>(__x
);
185 typedef void is_transparent
;
189 // Bitwise operations
191 #if _LIBCPP_STD_VER >= 14
192 template <class _Tp
= void>
196 struct _LIBCPP_TEMPLATE_VIS bit_and
: __binary_function
<_Tp
, _Tp
, _Tp
> {
197 typedef _Tp __result_type
; // used by valarray
198 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
202 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and
);
204 #if _LIBCPP_STD_VER >= 14
206 struct _LIBCPP_TEMPLATE_VIS bit_and
<void> {
207 template <class _T1
, class _T2
>
208 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
209 noexcept(noexcept(std::forward
<_T1
>(__t
) &
210 std::forward
<_T2
>(__u
))) -> decltype(std::forward
<_T1
>(__t
) & std::forward
<_T2
>(__u
)) {
211 return std::forward
<_T1
>(__t
) & std::forward
<_T2
>(__u
);
213 typedef void is_transparent
;
217 #if _LIBCPP_STD_VER >= 14
218 template <class _Tp
= void>
219 struct _LIBCPP_TEMPLATE_VIS bit_not
: __unary_function
<_Tp
, _Tp
> {
220 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
) const { return ~__x
; }
222 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not
);
225 struct _LIBCPP_TEMPLATE_VIS bit_not
<void> {
227 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_Tp
&& __x
) const
228 noexcept(noexcept(~std::forward
<_Tp
>(__x
))) //
229 -> decltype(~std::forward
<_Tp
>(__x
)) {
230 return ~std::forward
<_Tp
>(__x
);
232 typedef void is_transparent
;
236 #if _LIBCPP_STD_VER >= 14
237 template <class _Tp
= void>
241 struct _LIBCPP_TEMPLATE_VIS bit_or
: __binary_function
<_Tp
, _Tp
, _Tp
> {
242 typedef _Tp __result_type
; // used by valarray
243 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
247 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or
);
249 #if _LIBCPP_STD_VER >= 14
251 struct _LIBCPP_TEMPLATE_VIS bit_or
<void> {
252 template <class _T1
, class _T2
>
253 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
254 noexcept(noexcept(std::forward
<_T1
>(__t
) | std::forward
<_T2
>(__u
))) //
255 -> decltype(std::forward
<_T1
>(__t
) | std::forward
<_T2
>(__u
)) {
256 return std::forward
<_T1
>(__t
) | std::forward
<_T2
>(__u
);
258 typedef void is_transparent
;
262 #if _LIBCPP_STD_VER >= 14
263 template <class _Tp
= void>
267 struct _LIBCPP_TEMPLATE_VIS bit_xor
: __binary_function
<_Tp
, _Tp
, _Tp
> {
268 typedef _Tp __result_type
; // used by valarray
269 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp
operator()(const _Tp
& __x
, const _Tp
& __y
) const {
273 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor
);
275 #if _LIBCPP_STD_VER >= 14
277 struct _LIBCPP_TEMPLATE_VIS bit_xor
<void> {
278 template <class _T1
, class _T2
>
279 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
280 noexcept(noexcept(std::forward
<_T1
>(__t
) ^ std::forward
<_T2
>(__u
))) //
281 -> decltype(std::forward
<_T1
>(__t
) ^ std::forward
<_T2
>(__u
)) {
282 return std::forward
<_T1
>(__t
) ^ std::forward
<_T2
>(__u
);
284 typedef void is_transparent
;
288 // Comparison operations
290 #if _LIBCPP_STD_VER >= 14
291 template <class _Tp
= void>
295 struct _LIBCPP_TEMPLATE_VIS equal_to
: __binary_function
<_Tp
, _Tp
, bool> {
296 typedef bool __result_type
; // used by valarray
297 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
301 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to
);
303 #if _LIBCPP_STD_VER >= 14
305 struct _LIBCPP_TEMPLATE_VIS equal_to
<void> {
306 template <class _T1
, class _T2
>
307 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
308 noexcept(noexcept(std::forward
<_T1
>(__t
) == std::forward
<_T2
>(__u
))) //
309 -> decltype(std::forward
<_T1
>(__t
) == std::forward
<_T2
>(__u
)) {
310 return std::forward
<_T1
>(__t
) == std::forward
<_T2
>(__u
);
312 typedef void is_transparent
;
316 // The non-transparent std::equal_to specialization is only equivalent to a raw equality
317 // comparison when we don't perform an implicit conversion when calling it.
319 inline const bool __desugars_to_v
<__equal_tag
, equal_to
<_Tp
>, _Tp
, _Tp
> = true;
321 // In the transparent case, we do not enforce that
322 template <class _Tp
, class _Up
>
323 inline const bool __desugars_to_v
<__equal_tag
, equal_to
<void>, _Tp
, _Up
> = true;
325 #if _LIBCPP_STD_VER >= 14
326 template <class _Tp
= void>
330 struct _LIBCPP_TEMPLATE_VIS not_equal_to
: __binary_function
<_Tp
, _Tp
, bool> {
331 typedef bool __result_type
; // used by valarray
332 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
336 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to
);
338 #if _LIBCPP_STD_VER >= 14
340 struct _LIBCPP_TEMPLATE_VIS not_equal_to
<void> {
341 template <class _T1
, class _T2
>
342 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
343 noexcept(noexcept(std::forward
<_T1
>(__t
) != std::forward
<_T2
>(__u
))) //
344 -> decltype(std::forward
<_T1
>(__t
) != std::forward
<_T2
>(__u
)) {
345 return std::forward
<_T1
>(__t
) != std::forward
<_T2
>(__u
);
347 typedef void is_transparent
;
351 #if _LIBCPP_STD_VER >= 14
352 template <class _Tp
= void>
356 struct _LIBCPP_TEMPLATE_VIS less
: __binary_function
<_Tp
, _Tp
, bool> {
357 typedef bool __result_type
; // used by valarray
358 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
362 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less
);
365 inline const bool __desugars_to_v
<__less_tag
, less
<_Tp
>, _Tp
, _Tp
> = true;
367 #if _LIBCPP_STD_VER >= 14
369 struct _LIBCPP_TEMPLATE_VIS less
<void> {
370 template <class _T1
, class _T2
>
371 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
372 noexcept(noexcept(std::forward
<_T1
>(__t
) < std::forward
<_T2
>(__u
))) //
373 -> decltype(std::forward
<_T1
>(__t
) < std::forward
<_T2
>(__u
)) {
374 return std::forward
<_T1
>(__t
) < std::forward
<_T2
>(__u
);
376 typedef void is_transparent
;
380 inline const bool __desugars_to_v
<__less_tag
, less
<>, _Tp
, _Tp
> = true;
383 #if _LIBCPP_STD_VER >= 14
384 template <class _Tp
= void>
388 struct _LIBCPP_TEMPLATE_VIS less_equal
: __binary_function
<_Tp
, _Tp
, bool> {
389 typedef bool __result_type
; // used by valarray
390 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
394 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal
);
396 #if _LIBCPP_STD_VER >= 14
398 struct _LIBCPP_TEMPLATE_VIS less_equal
<void> {
399 template <class _T1
, class _T2
>
400 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
401 noexcept(noexcept(std::forward
<_T1
>(__t
) <= std::forward
<_T2
>(__u
))) //
402 -> decltype(std::forward
<_T1
>(__t
) <= std::forward
<_T2
>(__u
)) {
403 return std::forward
<_T1
>(__t
) <= std::forward
<_T2
>(__u
);
405 typedef void is_transparent
;
409 #if _LIBCPP_STD_VER >= 14
410 template <class _Tp
= void>
414 struct _LIBCPP_TEMPLATE_VIS greater_equal
: __binary_function
<_Tp
, _Tp
, bool> {
415 typedef bool __result_type
; // used by valarray
416 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
420 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal
);
422 #if _LIBCPP_STD_VER >= 14
424 struct _LIBCPP_TEMPLATE_VIS greater_equal
<void> {
425 template <class _T1
, class _T2
>
426 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
427 noexcept(noexcept(std::forward
<_T1
>(__t
) >=
428 std::forward
<_T2
>(__u
))) -> decltype(std::forward
<_T1
>(__t
) >= std::forward
<_T2
>(__u
)) {
429 return std::forward
<_T1
>(__t
) >= std::forward
<_T2
>(__u
);
431 typedef void is_transparent
;
435 #if _LIBCPP_STD_VER >= 14
436 template <class _Tp
= void>
440 struct _LIBCPP_TEMPLATE_VIS greater
: __binary_function
<_Tp
, _Tp
, bool> {
441 typedef bool __result_type
; // used by valarray
442 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
446 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater
);
448 #if _LIBCPP_STD_VER >= 14
450 struct _LIBCPP_TEMPLATE_VIS greater
<void> {
451 template <class _T1
, class _T2
>
452 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
453 noexcept(noexcept(std::forward
<_T1
>(__t
) > std::forward
<_T2
>(__u
))) //
454 -> decltype(std::forward
<_T1
>(__t
) > std::forward
<_T2
>(__u
)) {
455 return std::forward
<_T1
>(__t
) > std::forward
<_T2
>(__u
);
457 typedef void is_transparent
;
461 // Logical operations
463 #if _LIBCPP_STD_VER >= 14
464 template <class _Tp
= void>
468 struct _LIBCPP_TEMPLATE_VIS logical_and
: __binary_function
<_Tp
, _Tp
, bool> {
469 typedef bool __result_type
; // used by valarray
470 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
474 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and
);
476 #if _LIBCPP_STD_VER >= 14
478 struct _LIBCPP_TEMPLATE_VIS logical_and
<void> {
479 template <class _T1
, class _T2
>
480 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
481 noexcept(noexcept(std::forward
<_T1
>(__t
) && std::forward
<_T2
>(__u
))) //
482 -> decltype(std::forward
<_T1
>(__t
) && std::forward
<_T2
>(__u
)) {
483 return std::forward
<_T1
>(__t
) && std::forward
<_T2
>(__u
);
485 typedef void is_transparent
;
489 #if _LIBCPP_STD_VER >= 14
490 template <class _Tp
= void>
494 struct _LIBCPP_TEMPLATE_VIS logical_not
: __unary_function
<_Tp
, bool> {
495 typedef bool __result_type
; // used by valarray
496 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
) const { return !__x
; }
498 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not
);
500 #if _LIBCPP_STD_VER >= 14
502 struct _LIBCPP_TEMPLATE_VIS logical_not
<void> {
504 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_Tp
&& __x
) const
505 noexcept(noexcept(!std::forward
<_Tp
>(__x
))) //
506 -> decltype(!std::forward
<_Tp
>(__x
)) {
507 return !std::forward
<_Tp
>(__x
);
509 typedef void is_transparent
;
513 #if _LIBCPP_STD_VER >= 14
514 template <class _Tp
= void>
518 struct _LIBCPP_TEMPLATE_VIS logical_or
: __binary_function
<_Tp
, _Tp
, bool> {
519 typedef bool __result_type
; // used by valarray
520 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
bool operator()(const _Tp
& __x
, const _Tp
& __y
) const {
524 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or
);
526 #if _LIBCPP_STD_VER >= 14
528 struct _LIBCPP_TEMPLATE_VIS logical_or
<void> {
529 template <class _T1
, class _T2
>
530 _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
auto operator()(_T1
&& __t
, _T2
&& __u
) const
531 noexcept(noexcept(std::forward
<_T1
>(__t
) || std::forward
<_T2
>(__u
))) //
532 -> decltype(std::forward
<_T1
>(__t
) || std::forward
<_T2
>(__u
)) {
533 return std::forward
<_T1
>(__t
) || std::forward
<_T2
>(__u
);
535 typedef void is_transparent
;
539 _LIBCPP_END_NAMESPACE_STD
541 #endif // _LIBCPP___CXX03___FUNCTIONAL_OPERATIONS_H