1 // Functor implementations -*- C++ -*-
3 // Copyright (C) 2001-2023 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
28 * Hewlett-Packard Company
30 * Permission to use, copy, modify, distribute and sell this software
31 * and its documentation for any purpose is hereby granted without fee,
32 * provided that the above copyright notice appear in all copies and
33 * that both that copyright notice and this permission notice appear
34 * in supporting documentation. Hewlett-Packard Company makes no
35 * representations about the suitability of this software for any
36 * purpose. It is provided "as is" without express or implied warranty.
39 * Copyright (c) 1996-1998
40 * Silicon Graphics Computer Systems, Inc.
42 * Permission to use, copy, modify, distribute and sell this software
43 * and its documentation for any purpose is hereby granted without fee,
44 * provided that the above copyright notice appear in all copies and
45 * that both that copyright notice and this permission notice appear
46 * in supporting documentation. Silicon Graphics makes no
47 * representations about the suitability of this software for any
48 * purpose. It is provided "as is" without express or implied warranty.
51 /** @file bits/stl_function.h
52 * This is an internal header file, included by other library headers.
53 * Do not attempt to use it directly. @headername{functional}
56 #ifndef _STL_FUNCTION_H
57 #define _STL_FUNCTION_H 1
59 #if __cplusplus > 201103L
60 #include <bits/move.h>
63 namespace std
_GLIBCXX_VISIBILITY(default)
65 _GLIBCXX_BEGIN_NAMESPACE_VERSION
67 // 20.3.1 base classes
68 /** @defgroup functors Function Objects
71 * Function objects, or _functors_, are objects with an `operator()`
72 * defined and accessible. They can be passed as arguments to algorithm
73 * templates and used in place of a function pointer. Not only is the
74 * resulting expressiveness of the library increased, but the generated
75 * code can be more efficient than what you might write by hand. When we
76 * refer to _functors_, then, generally we include function pointers in
77 * the description as well.
79 * Often, functors are only created as temporaries passed to algorithm
80 * calls, rather than being created as named variables.
82 * Two examples taken from the standard itself follow. To perform a
83 * by-element addition of two vectors `a` and `b` containing `double`,
84 * and put the result in `a`, use
86 * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
88 * To negate every element in `a`, use
90 * transform(a.begin(), a.end(), a.begin(), negate<double>());
92 * The addition and negation functions will usually be inlined directly.
94 * An _adaptable function object_ is one which provides nested typedefs
95 * `result_type` and either `argument_type` (for a unary function) or
96 * `first_argument_type` and `second_argument_type` (for a binary function).
97 * Those typedefs are used by function object adaptors such as `bind2nd`.
98 * The standard library provides two class templates, `unary_function` and
99 * `binary_function`, which define those typedefs and so can be used as
100 * base classes of adaptable function objects.
102 * Since C++11 the use of function object adaptors has been superseded by
103 * more powerful tools such as lambda expressions, `function<>`, and more
104 * powerful type deduction (using `auto` and `decltype`). The helpers for
105 * defining adaptable function objects are deprecated since C++11, and no
106 * longer part of the standard library since C++17. However, they are still
107 * defined and used by libstdc++ after C++17, as a conforming extension.
113 * Helper for defining adaptable unary function objects.
114 * @deprecated Deprecated in C++11, no longer in the standard since C++17.
116 template<typename _Arg
, typename _Result
>
117 struct unary_function
119 /// @c argument_type is the type of the argument
120 typedef _Arg argument_type
;
122 /// @c result_type is the return type
123 typedef _Result result_type
;
124 } _GLIBCXX11_DEPRECATED
;
127 * Helper for defining adaptable binary function objects.
128 * @deprecated Deprecated in C++11, no longer in the standard since C++17.
130 template<typename _Arg1
, typename _Arg2
, typename _Result
>
131 struct binary_function
133 /// @c first_argument_type is the type of the first argument
134 typedef _Arg1 first_argument_type
;
136 /// @c second_argument_type is the type of the second argument
137 typedef _Arg2 second_argument_type
;
139 /// @c result_type is the return type
140 typedef _Result result_type
;
141 } _GLIBCXX11_DEPRECATED
;
146 /** @defgroup arithmetic_functors Arithmetic Function Object Classes
149 * The library provides function objects for basic arithmetic operations.
150 * See the documentation for @link functors function objects @endlink
151 * for examples of their use.
156 #if __cplusplus > 201103L
157 struct __is_transparent
; // undefined
159 template<typename _Tp
= void>
162 template<typename _Tp
= void>
165 template<typename _Tp
= void>
168 template<typename _Tp
= void>
171 template<typename _Tp
= void>
174 template<typename _Tp
= void>
178 // Ignore warnings about unary_function and binary_function.
179 #pragma GCC diagnostic push
180 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
182 /// One of the @link arithmetic_functors math functors@endlink.
183 template<typename _Tp
>
184 struct plus
: public binary_function
<_Tp
, _Tp
, _Tp
>
189 operator()(const _Tp
& __x
, const _Tp
& __y
) const
190 { return __x
+ __y
; }
193 /// One of the @link arithmetic_functors math functors@endlink.
194 template<typename _Tp
>
195 struct minus
: public binary_function
<_Tp
, _Tp
, _Tp
>
199 operator()(const _Tp
& __x
, const _Tp
& __y
) const
200 { return __x
- __y
; }
203 /// One of the @link arithmetic_functors math functors@endlink.
204 template<typename _Tp
>
205 struct multiplies
: public binary_function
<_Tp
, _Tp
, _Tp
>
209 operator()(const _Tp
& __x
, const _Tp
& __y
) const
210 { return __x
* __y
; }
213 /// One of the @link arithmetic_functors math functors@endlink.
214 template<typename _Tp
>
215 struct divides
: public binary_function
<_Tp
, _Tp
, _Tp
>
219 operator()(const _Tp
& __x
, const _Tp
& __y
) const
220 { return __x
/ __y
; }
223 /// One of the @link arithmetic_functors math functors@endlink.
224 template<typename _Tp
>
225 struct modulus
: public binary_function
<_Tp
, _Tp
, _Tp
>
229 operator()(const _Tp
& __x
, const _Tp
& __y
) const
230 { return __x
% __y
; }
233 /// One of the @link arithmetic_functors math functors@endlink.
234 template<typename _Tp
>
235 struct negate
: public unary_function
<_Tp
, _Tp
>
239 operator()(const _Tp
& __x
) const
242 #pragma GCC diagnostic pop
244 #if __cplusplus > 201103L
246 #define __cpp_lib_transparent_operators 201510L
251 template <typename _Tp
, typename _Up
>
254 operator()(_Tp
&& __t
, _Up
&& __u
) const
255 noexcept(noexcept(std::forward
<_Tp
>(__t
) + std::forward
<_Up
>(__u
)))
256 -> decltype(std::forward
<_Tp
>(__t
) + std::forward
<_Up
>(__u
))
257 { return std::forward
<_Tp
>(__t
) + std::forward
<_Up
>(__u
); }
259 typedef __is_transparent is_transparent
;
262 /// One of the @link arithmetic_functors math functors@endlink.
266 template <typename _Tp
, typename _Up
>
269 operator()(_Tp
&& __t
, _Up
&& __u
) const
270 noexcept(noexcept(std::forward
<_Tp
>(__t
) - std::forward
<_Up
>(__u
)))
271 -> decltype(std::forward
<_Tp
>(__t
) - std::forward
<_Up
>(__u
))
272 { return std::forward
<_Tp
>(__t
) - std::forward
<_Up
>(__u
); }
274 typedef __is_transparent is_transparent
;
277 /// One of the @link arithmetic_functors math functors@endlink.
279 struct multiplies
<void>
281 template <typename _Tp
, typename _Up
>
284 operator()(_Tp
&& __t
, _Up
&& __u
) const
285 noexcept(noexcept(std::forward
<_Tp
>(__t
) * std::forward
<_Up
>(__u
)))
286 -> decltype(std::forward
<_Tp
>(__t
) * std::forward
<_Up
>(__u
))
287 { return std::forward
<_Tp
>(__t
) * std::forward
<_Up
>(__u
); }
289 typedef __is_transparent is_transparent
;
292 /// One of the @link arithmetic_functors math functors@endlink.
296 template <typename _Tp
, typename _Up
>
299 operator()(_Tp
&& __t
, _Up
&& __u
) const
300 noexcept(noexcept(std::forward
<_Tp
>(__t
) / std::forward
<_Up
>(__u
)))
301 -> decltype(std::forward
<_Tp
>(__t
) / std::forward
<_Up
>(__u
))
302 { return std::forward
<_Tp
>(__t
) / std::forward
<_Up
>(__u
); }
304 typedef __is_transparent is_transparent
;
307 /// One of the @link arithmetic_functors math functors@endlink.
311 template <typename _Tp
, typename _Up
>
314 operator()(_Tp
&& __t
, _Up
&& __u
) const
315 noexcept(noexcept(std::forward
<_Tp
>(__t
) % std::forward
<_Up
>(__u
)))
316 -> decltype(std::forward
<_Tp
>(__t
) % std::forward
<_Up
>(__u
))
317 { return std::forward
<_Tp
>(__t
) % std::forward
<_Up
>(__u
); }
319 typedef __is_transparent is_transparent
;
322 /// One of the @link arithmetic_functors math functors@endlink.
326 template <typename _Tp
>
329 operator()(_Tp
&& __t
) const
330 noexcept(noexcept(-std::forward
<_Tp
>(__t
)))
331 -> decltype(-std::forward
<_Tp
>(__t
))
332 { return -std::forward
<_Tp
>(__t
); }
334 typedef __is_transparent is_transparent
;
339 // 20.3.3 comparisons
340 /** @defgroup comparison_functors Comparison Classes
343 * The library provides six wrapper functors for all the basic comparisons
348 #if __cplusplus > 201103L
349 template<typename _Tp
= void>
352 template<typename _Tp
= void>
355 template<typename _Tp
= void>
358 template<typename _Tp
= void>
361 template<typename _Tp
= void>
362 struct greater_equal
;
364 template<typename _Tp
= void>
368 #pragma GCC diagnostic push
369 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
371 /// One of the @link comparison_functors comparison functors@endlink.
372 template<typename _Tp
>
373 struct equal_to
: public binary_function
<_Tp
, _Tp
, bool>
377 operator()(const _Tp
& __x
, const _Tp
& __y
) const
378 { return __x
== __y
; }
381 /// One of the @link comparison_functors comparison functors@endlink.
382 template<typename _Tp
>
383 struct not_equal_to
: public binary_function
<_Tp
, _Tp
, bool>
387 operator()(const _Tp
& __x
, const _Tp
& __y
) const
388 { return __x
!= __y
; }
391 /// One of the @link comparison_functors comparison functors@endlink.
392 template<typename _Tp
>
393 struct greater
: public binary_function
<_Tp
, _Tp
, bool>
397 operator()(const _Tp
& __x
, const _Tp
& __y
) const
398 { return __x
> __y
; }
401 /// One of the @link comparison_functors comparison functors@endlink.
402 template<typename _Tp
>
403 struct less
: public binary_function
<_Tp
, _Tp
, bool>
407 operator()(const _Tp
& __x
, const _Tp
& __y
) const
408 { return __x
< __y
; }
411 /// One of the @link comparison_functors comparison functors@endlink.
412 template<typename _Tp
>
413 struct greater_equal
: public binary_function
<_Tp
, _Tp
, bool>
417 operator()(const _Tp
& __x
, const _Tp
& __y
) const
418 { return __x
>= __y
; }
421 /// One of the @link comparison_functors comparison functors@endlink.
422 template<typename _Tp
>
423 struct less_equal
: public binary_function
<_Tp
, _Tp
, bool>
427 operator()(const _Tp
& __x
, const _Tp
& __y
) const
428 { return __x
<= __y
; }
431 // Partial specialization of std::greater for pointers.
432 template<typename _Tp
>
433 struct greater
<_Tp
*> : public binary_function
<_Tp
*, _Tp
*, bool>
435 _GLIBCXX14_CONSTEXPR
bool
436 operator()(_Tp
* __x
, _Tp
* __y
) const _GLIBCXX_NOTHROW
438 #if __cplusplus >= 201402L
439 if (std::__is_constant_evaluated())
442 return (__UINTPTR_TYPE__
)__x
> (__UINTPTR_TYPE__
)__y
;
446 // Partial specialization of std::less for pointers.
447 template<typename _Tp
>
448 struct less
<_Tp
*> : public binary_function
<_Tp
*, _Tp
*, bool>
450 _GLIBCXX14_CONSTEXPR
bool
451 operator()(_Tp
* __x
, _Tp
* __y
) const _GLIBCXX_NOTHROW
453 #if __cplusplus >= 201402L
454 if (std::__is_constant_evaluated())
457 return (__UINTPTR_TYPE__
)__x
< (__UINTPTR_TYPE__
)__y
;
461 // Partial specialization of std::greater_equal for pointers.
462 template<typename _Tp
>
463 struct greater_equal
<_Tp
*> : public binary_function
<_Tp
*, _Tp
*, bool>
465 _GLIBCXX14_CONSTEXPR
bool
466 operator()(_Tp
* __x
, _Tp
* __y
) const _GLIBCXX_NOTHROW
468 #if __cplusplus >= 201402L
469 if (std::__is_constant_evaluated())
472 return (__UINTPTR_TYPE__
)__x
>= (__UINTPTR_TYPE__
)__y
;
476 // Partial specialization of std::less_equal for pointers.
477 template<typename _Tp
>
478 struct less_equal
<_Tp
*> : public binary_function
<_Tp
*, _Tp
*, bool>
480 _GLIBCXX14_CONSTEXPR
bool
481 operator()(_Tp
* __x
, _Tp
* __y
) const _GLIBCXX_NOTHROW
483 #if __cplusplus >= 201402L
484 if (std::__is_constant_evaluated())
487 return (__UINTPTR_TYPE__
)__x
<= (__UINTPTR_TYPE__
)__y
;
490 #pragma GCC diagnostic pop
492 #if __cplusplus >= 201402L
493 /// One of the @link comparison_functors comparison functors@endlink.
495 struct equal_to
<void>
497 template <typename _Tp
, typename _Up
>
499 operator()(_Tp
&& __t
, _Up
&& __u
) const
500 noexcept(noexcept(std::forward
<_Tp
>(__t
) == std::forward
<_Up
>(__u
)))
501 -> decltype(std::forward
<_Tp
>(__t
) == std::forward
<_Up
>(__u
))
502 { return std::forward
<_Tp
>(__t
) == std::forward
<_Up
>(__u
); }
504 typedef __is_transparent is_transparent
;
507 /// One of the @link comparison_functors comparison functors@endlink.
509 struct not_equal_to
<void>
511 template <typename _Tp
, typename _Up
>
513 operator()(_Tp
&& __t
, _Up
&& __u
) const
514 noexcept(noexcept(std::forward
<_Tp
>(__t
) != std::forward
<_Up
>(__u
)))
515 -> decltype(std::forward
<_Tp
>(__t
) != std::forward
<_Up
>(__u
))
516 { return std::forward
<_Tp
>(__t
) != std::forward
<_Up
>(__u
); }
518 typedef __is_transparent is_transparent
;
521 /// One of the @link comparison_functors comparison functors@endlink.
525 template <typename _Tp
, typename _Up
>
527 operator()(_Tp
&& __t
, _Up
&& __u
) const
528 noexcept(noexcept(std::forward
<_Tp
>(__t
) > std::forward
<_Up
>(__u
)))
529 -> decltype(std::forward
<_Tp
>(__t
) > std::forward
<_Up
>(__u
))
531 return _S_cmp(std::forward
<_Tp
>(__t
), std::forward
<_Up
>(__u
),
532 __ptr_cmp
<_Tp
, _Up
>{});
535 template<typename _Tp
, typename _Up
>
537 operator()(_Tp
* __t
, _Up
* __u
) const noexcept
538 { return greater
<common_type_t
<_Tp
*, _Up
*>>{}(__t
, __u
); }
540 typedef __is_transparent is_transparent
;
543 template <typename _Tp
, typename _Up
>
544 static constexpr decltype(auto)
545 _S_cmp(_Tp
&& __t
, _Up
&& __u
, false_type
)
546 { return std::forward
<_Tp
>(__t
) > std::forward
<_Up
>(__u
); }
548 template <typename _Tp
, typename _Up
>
549 static constexpr bool
550 _S_cmp(_Tp
&& __t
, _Up
&& __u
, true_type
) noexcept
552 return greater
<const volatile void*>{}(
553 static_cast<const volatile void*>(std::forward
<_Tp
>(__t
)),
554 static_cast<const volatile void*>(std::forward
<_Up
>(__u
)));
557 // True if there is no viable operator> member function.
558 template<typename _Tp
, typename _Up
, typename
= void>
559 struct __not_overloaded2
: true_type
{ };
561 // False if we can call T.operator>(U)
562 template<typename _Tp
, typename _Up
>
563 struct __not_overloaded2
<_Tp
, _Up
, __void_t
<
564 decltype(std::declval
<_Tp
>().operator>(std::declval
<_Up
>()))>>
567 // True if there is no overloaded operator> for these operands.
568 template<typename _Tp
, typename _Up
, typename
= void>
569 struct __not_overloaded
: __not_overloaded2
<_Tp
, _Up
> { };
571 // False if we can call operator>(T,U)
572 template<typename _Tp
, typename _Up
>
573 struct __not_overloaded
<_Tp
, _Up
, __void_t
<
574 decltype(operator>(std::declval
<_Tp
>(), std::declval
<_Up
>()))>>
577 template<typename _Tp
, typename _Up
>
578 using __ptr_cmp
= __and_
<__not_overloaded
<_Tp
, _Up
>,
579 is_convertible
<_Tp
, const volatile void*>,
580 is_convertible
<_Up
, const volatile void*>>;
583 /// One of the @link comparison_functors comparison functors@endlink.
587 template <typename _Tp
, typename _Up
>
589 operator()(_Tp
&& __t
, _Up
&& __u
) const
590 noexcept(noexcept(std::forward
<_Tp
>(__t
) < std::forward
<_Up
>(__u
)))
591 -> decltype(std::forward
<_Tp
>(__t
) < std::forward
<_Up
>(__u
))
593 return _S_cmp(std::forward
<_Tp
>(__t
), std::forward
<_Up
>(__u
),
594 __ptr_cmp
<_Tp
, _Up
>{});
597 template<typename _Tp
, typename _Up
>
599 operator()(_Tp
* __t
, _Up
* __u
) const noexcept
600 { return less
<common_type_t
<_Tp
*, _Up
*>>{}(__t
, __u
); }
602 typedef __is_transparent is_transparent
;
605 template <typename _Tp
, typename _Up
>
606 static constexpr decltype(auto)
607 _S_cmp(_Tp
&& __t
, _Up
&& __u
, false_type
)
608 { return std::forward
<_Tp
>(__t
) < std::forward
<_Up
>(__u
); }
610 template <typename _Tp
, typename _Up
>
611 static constexpr bool
612 _S_cmp(_Tp
&& __t
, _Up
&& __u
, true_type
) noexcept
614 return less
<const volatile void*>{}(
615 static_cast<const volatile void*>(std::forward
<_Tp
>(__t
)),
616 static_cast<const volatile void*>(std::forward
<_Up
>(__u
)));
619 // True if there is no viable operator< member function.
620 template<typename _Tp
, typename _Up
, typename
= void>
621 struct __not_overloaded2
: true_type
{ };
623 // False if we can call T.operator<(U)
624 template<typename _Tp
, typename _Up
>
625 struct __not_overloaded2
<_Tp
, _Up
, __void_t
<
626 decltype(std::declval
<_Tp
>().operator<(std::declval
<_Up
>()))>>
629 // True if there is no overloaded operator< for these operands.
630 template<typename _Tp
, typename _Up
, typename
= void>
631 struct __not_overloaded
: __not_overloaded2
<_Tp
, _Up
> { };
633 // False if we can call operator<(T,U)
634 template<typename _Tp
, typename _Up
>
635 struct __not_overloaded
<_Tp
, _Up
, __void_t
<
636 decltype(operator<(std::declval
<_Tp
>(), std::declval
<_Up
>()))>>
639 template<typename _Tp
, typename _Up
>
640 using __ptr_cmp
= __and_
<__not_overloaded
<_Tp
, _Up
>,
641 is_convertible
<_Tp
, const volatile void*>,
642 is_convertible
<_Up
, const volatile void*>>;
645 /// One of the @link comparison_functors comparison functors@endlink.
647 struct greater_equal
<void>
649 template <typename _Tp
, typename _Up
>
651 operator()(_Tp
&& __t
, _Up
&& __u
) const
652 noexcept(noexcept(std::forward
<_Tp
>(__t
) >= std::forward
<_Up
>(__u
)))
653 -> decltype(std::forward
<_Tp
>(__t
) >= std::forward
<_Up
>(__u
))
655 return _S_cmp(std::forward
<_Tp
>(__t
), std::forward
<_Up
>(__u
),
656 __ptr_cmp
<_Tp
, _Up
>{});
659 template<typename _Tp
, typename _Up
>
661 operator()(_Tp
* __t
, _Up
* __u
) const noexcept
662 { return greater_equal
<common_type_t
<_Tp
*, _Up
*>>{}(__t
, __u
); }
664 typedef __is_transparent is_transparent
;
667 template <typename _Tp
, typename _Up
>
668 static constexpr decltype(auto)
669 _S_cmp(_Tp
&& __t
, _Up
&& __u
, false_type
)
670 { return std::forward
<_Tp
>(__t
) >= std::forward
<_Up
>(__u
); }
672 template <typename _Tp
, typename _Up
>
673 static constexpr bool
674 _S_cmp(_Tp
&& __t
, _Up
&& __u
, true_type
) noexcept
676 return greater_equal
<const volatile void*>{}(
677 static_cast<const volatile void*>(std::forward
<_Tp
>(__t
)),
678 static_cast<const volatile void*>(std::forward
<_Up
>(__u
)));
681 // True if there is no viable operator>= member function.
682 template<typename _Tp
, typename _Up
, typename
= void>
683 struct __not_overloaded2
: true_type
{ };
685 // False if we can call T.operator>=(U)
686 template<typename _Tp
, typename _Up
>
687 struct __not_overloaded2
<_Tp
, _Up
, __void_t
<
688 decltype(std::declval
<_Tp
>().operator>=(std::declval
<_Up
>()))>>
691 // True if there is no overloaded operator>= for these operands.
692 template<typename _Tp
, typename _Up
, typename
= void>
693 struct __not_overloaded
: __not_overloaded2
<_Tp
, _Up
> { };
695 // False if we can call operator>=(T,U)
696 template<typename _Tp
, typename _Up
>
697 struct __not_overloaded
<_Tp
, _Up
, __void_t
<
698 decltype(operator>=(std::declval
<_Tp
>(), std::declval
<_Up
>()))>>
701 template<typename _Tp
, typename _Up
>
702 using __ptr_cmp
= __and_
<__not_overloaded
<_Tp
, _Up
>,
703 is_convertible
<_Tp
, const volatile void*>,
704 is_convertible
<_Up
, const volatile void*>>;
707 /// One of the @link comparison_functors comparison functors@endlink.
709 struct less_equal
<void>
711 template <typename _Tp
, typename _Up
>
713 operator()(_Tp
&& __t
, _Up
&& __u
) const
714 noexcept(noexcept(std::forward
<_Tp
>(__t
) <= std::forward
<_Up
>(__u
)))
715 -> decltype(std::forward
<_Tp
>(__t
) <= std::forward
<_Up
>(__u
))
717 return _S_cmp(std::forward
<_Tp
>(__t
), std::forward
<_Up
>(__u
),
718 __ptr_cmp
<_Tp
, _Up
>{});
721 template<typename _Tp
, typename _Up
>
723 operator()(_Tp
* __t
, _Up
* __u
) const noexcept
724 { return less_equal
<common_type_t
<_Tp
*, _Up
*>>{}(__t
, __u
); }
726 typedef __is_transparent is_transparent
;
729 template <typename _Tp
, typename _Up
>
730 static constexpr decltype(auto)
731 _S_cmp(_Tp
&& __t
, _Up
&& __u
, false_type
)
732 { return std::forward
<_Tp
>(__t
) <= std::forward
<_Up
>(__u
); }
734 template <typename _Tp
, typename _Up
>
735 static constexpr bool
736 _S_cmp(_Tp
&& __t
, _Up
&& __u
, true_type
) noexcept
738 return less_equal
<const volatile void*>{}(
739 static_cast<const volatile void*>(std::forward
<_Tp
>(__t
)),
740 static_cast<const volatile void*>(std::forward
<_Up
>(__u
)));
743 // True if there is no viable operator<= member function.
744 template<typename _Tp
, typename _Up
, typename
= void>
745 struct __not_overloaded2
: true_type
{ };
747 // False if we can call T.operator<=(U)
748 template<typename _Tp
, typename _Up
>
749 struct __not_overloaded2
<_Tp
, _Up
, __void_t
<
750 decltype(std::declval
<_Tp
>().operator<=(std::declval
<_Up
>()))>>
753 // True if there is no overloaded operator<= for these operands.
754 template<typename _Tp
, typename _Up
, typename
= void>
755 struct __not_overloaded
: __not_overloaded2
<_Tp
, _Up
> { };
757 // False if we can call operator<=(T,U)
758 template<typename _Tp
, typename _Up
>
759 struct __not_overloaded
<_Tp
, _Up
, __void_t
<
760 decltype(operator<=(std::declval
<_Tp
>(), std::declval
<_Up
>()))>>
763 template<typename _Tp
, typename _Up
>
764 using __ptr_cmp
= __and_
<__not_overloaded
<_Tp
, _Up
>,
765 is_convertible
<_Tp
, const volatile void*>,
766 is_convertible
<_Up
, const volatile void*>>;
771 // 20.3.4 logical operations
772 /** @defgroup logical_functors Boolean Operations Classes
775 * The library provides function objects for the logical operations:
776 * `&&`, `||`, and `!`.
780 #if __cplusplus > 201103L
781 template<typename _Tp
= void>
784 template<typename _Tp
= void>
787 template<typename _Tp
= void>
791 #pragma GCC diagnostic push
792 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
794 /// One of the @link logical_functors Boolean operations functors@endlink.
795 template<typename _Tp
>
796 struct logical_and
: public binary_function
<_Tp
, _Tp
, bool>
800 operator()(const _Tp
& __x
, const _Tp
& __y
) const
801 { return __x
&& __y
; }
804 /// One of the @link logical_functors Boolean operations functors@endlink.
805 template<typename _Tp
>
806 struct logical_or
: public binary_function
<_Tp
, _Tp
, bool>
810 operator()(const _Tp
& __x
, const _Tp
& __y
) const
811 { return __x
|| __y
; }
814 /// One of the @link logical_functors Boolean operations functors@endlink.
815 template<typename _Tp
>
816 struct logical_not
: public unary_function
<_Tp
, bool>
820 operator()(const _Tp
& __x
) const
823 #pragma GCC diagnostic pop
825 #if __cplusplus > 201103L
826 /// One of the @link logical_functors Boolean operations functors@endlink.
828 struct logical_and
<void>
830 template <typename _Tp
, typename _Up
>
833 operator()(_Tp
&& __t
, _Up
&& __u
) const
834 noexcept(noexcept(std::forward
<_Tp
>(__t
) && std::forward
<_Up
>(__u
)))
835 -> decltype(std::forward
<_Tp
>(__t
) && std::forward
<_Up
>(__u
))
836 { return std::forward
<_Tp
>(__t
) && std::forward
<_Up
>(__u
); }
838 typedef __is_transparent is_transparent
;
841 /// One of the @link logical_functors Boolean operations functors@endlink.
843 struct logical_or
<void>
845 template <typename _Tp
, typename _Up
>
848 operator()(_Tp
&& __t
, _Up
&& __u
) const
849 noexcept(noexcept(std::forward
<_Tp
>(__t
) || std::forward
<_Up
>(__u
)))
850 -> decltype(std::forward
<_Tp
>(__t
) || std::forward
<_Up
>(__u
))
851 { return std::forward
<_Tp
>(__t
) || std::forward
<_Up
>(__u
); }
853 typedef __is_transparent is_transparent
;
856 /// One of the @link logical_functors Boolean operations functors@endlink.
858 struct logical_not
<void>
860 template <typename _Tp
>
863 operator()(_Tp
&& __t
) const
864 noexcept(noexcept(!std::forward
<_Tp
>(__t
)))
865 -> decltype(!std::forward
<_Tp
>(__t
))
866 { return !std::forward
<_Tp
>(__t
); }
868 typedef __is_transparent is_transparent
;
873 #if __cplusplus > 201103L
874 template<typename _Tp
= void>
877 template<typename _Tp
= void>
880 template<typename _Tp
= void>
883 template<typename _Tp
= void>
887 #pragma GCC diagnostic push
888 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
890 // _GLIBCXX_RESOLVE_LIB_DEFECTS
891 // DR 660. Missing Bitwise Operations.
892 template<typename _Tp
>
893 struct bit_and
: public binary_function
<_Tp
, _Tp
, _Tp
>
897 operator()(const _Tp
& __x
, const _Tp
& __y
) const
898 { return __x
& __y
; }
901 template<typename _Tp
>
902 struct bit_or
: public binary_function
<_Tp
, _Tp
, _Tp
>
906 operator()(const _Tp
& __x
, const _Tp
& __y
) const
907 { return __x
| __y
; }
910 template<typename _Tp
>
911 struct bit_xor
: public binary_function
<_Tp
, _Tp
, _Tp
>
915 operator()(const _Tp
& __x
, const _Tp
& __y
) const
916 { return __x
^ __y
; }
919 template<typename _Tp
>
920 struct bit_not
: public unary_function
<_Tp
, _Tp
>
924 operator()(const _Tp
& __x
) const
927 #pragma GCC diagnostic pop
929 #if __cplusplus > 201103L
933 template <typename _Tp
, typename _Up
>
936 operator()(_Tp
&& __t
, _Up
&& __u
) const
937 noexcept(noexcept(std::forward
<_Tp
>(__t
) & std::forward
<_Up
>(__u
)))
938 -> decltype(std::forward
<_Tp
>(__t
) & std::forward
<_Up
>(__u
))
939 { return std::forward
<_Tp
>(__t
) & std::forward
<_Up
>(__u
); }
941 typedef __is_transparent is_transparent
;
947 template <typename _Tp
, typename _Up
>
950 operator()(_Tp
&& __t
, _Up
&& __u
) const
951 noexcept(noexcept(std::forward
<_Tp
>(__t
) | std::forward
<_Up
>(__u
)))
952 -> decltype(std::forward
<_Tp
>(__t
) | std::forward
<_Up
>(__u
))
953 { return std::forward
<_Tp
>(__t
) | std::forward
<_Up
>(__u
); }
955 typedef __is_transparent is_transparent
;
961 template <typename _Tp
, typename _Up
>
964 operator()(_Tp
&& __t
, _Up
&& __u
) const
965 noexcept(noexcept(std::forward
<_Tp
>(__t
) ^ std::forward
<_Up
>(__u
)))
966 -> decltype(std::forward
<_Tp
>(__t
) ^ std::forward
<_Up
>(__u
))
967 { return std::forward
<_Tp
>(__t
) ^ std::forward
<_Up
>(__u
); }
969 typedef __is_transparent is_transparent
;
975 template <typename _Tp
>
978 operator()(_Tp
&& __t
) const
979 noexcept(noexcept(~std::forward
<_Tp
>(__t
)))
980 -> decltype(~std::forward
<_Tp
>(__t
))
981 { return ~std::forward
<_Tp
>(__t
); }
983 typedef __is_transparent is_transparent
;
987 #pragma GCC diagnostic push
988 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
991 /** @defgroup negators Negators
994 * The function templates `not1` and `not2` are function object adaptors,
995 * which each take a predicate functor and wrap it in an instance of
996 * `unary_negate` or `binary_negate`, respectively. Those classes are
997 * functors whose `operator()` evaluates the wrapped predicate function
998 * and then returns the negation of the result.
1000 * For example, given a vector of integers and a trivial predicate,
1002 * struct IntGreaterThanThree
1003 * : public std::unary_function<int, bool>
1005 * bool operator() (int x) const { return x > 3; }
1008 * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
1010 * The call to `find_if` will locate the first index (i) of `v` for which
1011 * `!(v[i] > 3)` is true.
1013 * The not1/unary_negate combination works on predicates taking a single
1014 * argument. The not2/binary_negate combination works on predicates taking
1017 * @deprecated Deprecated in C++17, no longer in the standard since C++20.
1018 * Use `not_fn` instead.
1022 /// One of the @link negators negation functors@endlink.
1023 template<typename _Predicate
>
1024 class _GLIBCXX17_DEPRECATED unary_negate
1025 : public unary_function
<typename
_Predicate::argument_type
, bool>
1031 _GLIBCXX14_CONSTEXPR
1033 unary_negate(const _Predicate
& __x
) : _M_pred(__x
) { }
1035 _GLIBCXX14_CONSTEXPR
1037 operator()(const typename
_Predicate::argument_type
& __x
) const
1038 { return !_M_pred(__x
); }
1041 /// One of the @link negators negation functors@endlink.
1042 template<typename _Predicate
>
1043 _GLIBCXX17_DEPRECATED_SUGGEST("std::not_fn")
1044 _GLIBCXX14_CONSTEXPR
1045 inline unary_negate
<_Predicate
>
1046 not1(const _Predicate
& __pred
)
1047 { return unary_negate
<_Predicate
>(__pred
); }
1049 /// One of the @link negators negation functors@endlink.
1050 template<typename _Predicate
>
1051 class _GLIBCXX17_DEPRECATED binary_negate
1052 : public binary_function
<typename
_Predicate::first_argument_type
,
1053 typename
_Predicate::second_argument_type
, bool>
1059 _GLIBCXX14_CONSTEXPR
1061 binary_negate(const _Predicate
& __x
) : _M_pred(__x
) { }
1063 _GLIBCXX14_CONSTEXPR
1065 operator()(const typename
_Predicate::first_argument_type
& __x
,
1066 const typename
_Predicate::second_argument_type
& __y
) const
1067 { return !_M_pred(__x
, __y
); }
1070 /// One of the @link negators negation functors@endlink.
1071 template<typename _Predicate
>
1072 _GLIBCXX17_DEPRECATED_SUGGEST("std::not_fn")
1073 _GLIBCXX14_CONSTEXPR
1074 inline binary_negate
<_Predicate
>
1075 not2(const _Predicate
& __pred
)
1076 { return binary_negate
<_Predicate
>(__pred
); }
1079 // 20.3.7 adaptors pointers functions
1080 /** @defgroup pointer_adaptors Adaptors for pointers to functions
1083 * The advantage of function objects over pointers to functions is that
1084 * the objects in the standard library declare nested typedefs describing
1085 * their argument and result types with uniform names (e.g., `result_type`
1086 * from the base classes `unary_function` and `binary_function`).
1087 * Sometimes those typedefs are required, not just optional.
1089 * Adaptors are provided to turn pointers to unary (single-argument) and
1090 * binary (double-argument) functions into function objects. The
1091 * long-winded functor `pointer_to_unary_function` is constructed with a
1092 * function pointer `f`, and its `operator()` called with argument `x`
1093 * returns `f(x)`. The functor `pointer_to_binary_function` does the same
1094 * thing, but with a double-argument `f` and `operator()`.
1096 * The function `ptr_fun` takes a pointer-to-function `f` and constructs
1097 * an instance of the appropriate functor.
1099 * @deprecated Deprecated in C++11, no longer in the standard since C++17.
1103 /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
1104 template<typename _Arg
, typename _Result
>
1105 class pointer_to_unary_function
: public unary_function
<_Arg
, _Result
>
1108 _Result (*_M_ptr
)(_Arg
);
1111 pointer_to_unary_function() { }
1114 pointer_to_unary_function(_Result (*__x
)(_Arg
))
1118 operator()(_Arg __x
) const
1119 { return _M_ptr(__x
); }
1120 } _GLIBCXX11_DEPRECATED
;
1122 /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
1123 template<typename _Arg
, typename _Result
>
1124 _GLIBCXX11_DEPRECATED_SUGGEST("std::function")
1125 inline pointer_to_unary_function
<_Arg
, _Result
>
1126 ptr_fun(_Result (*__x
)(_Arg
))
1127 { return pointer_to_unary_function
<_Arg
, _Result
>(__x
); }
1129 /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
1130 template<typename _Arg1
, typename _Arg2
, typename _Result
>
1131 class pointer_to_binary_function
1132 : public binary_function
<_Arg1
, _Arg2
, _Result
>
1135 _Result (*_M_ptr
)(_Arg1
, _Arg2
);
1138 pointer_to_binary_function() { }
1141 pointer_to_binary_function(_Result (*__x
)(_Arg1
, _Arg2
))
1145 operator()(_Arg1 __x
, _Arg2 __y
) const
1146 { return _M_ptr(__x
, __y
); }
1147 } _GLIBCXX11_DEPRECATED
;
1149 /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
1150 template<typename _Arg1
, typename _Arg2
, typename _Result
>
1151 _GLIBCXX11_DEPRECATED_SUGGEST("std::function")
1152 inline pointer_to_binary_function
<_Arg1
, _Arg2
, _Result
>
1153 ptr_fun(_Result (*__x
)(_Arg1
, _Arg2
))
1154 { return pointer_to_binary_function
<_Arg1
, _Arg2
, _Result
>(__x
); }
1157 template<typename _Tp
>
1159 : public unary_function
<_Tp
, _Tp
>
1162 operator()(_Tp
& __x
) const
1166 operator()(const _Tp
& __x
) const
1170 // Partial specialization, avoids confusing errors in e.g. std::set<const T>.
1171 template<typename _Tp
> struct _Identity
<const _Tp
> : _Identity
<_Tp
> { };
1173 template<typename _Pair
>
1175 : public unary_function
<_Pair
, typename
_Pair::first_type
>
1177 typename
_Pair::first_type
&
1178 operator()(_Pair
& __x
) const
1179 { return __x
.first
; }
1181 const typename
_Pair::first_type
&
1182 operator()(const _Pair
& __x
) const
1183 { return __x
.first
; }
1185 #if __cplusplus >= 201103L
1186 template<typename _Pair2
>
1187 typename
_Pair2::first_type
&
1188 operator()(_Pair2
& __x
) const
1189 { return __x
.first
; }
1191 template<typename _Pair2
>
1192 const typename
_Pair2::first_type
&
1193 operator()(const _Pair2
& __x
) const
1194 { return __x
.first
; }
1198 template<typename _Pair
>
1200 : public unary_function
<_Pair
, typename
_Pair::second_type
>
1202 typename
_Pair::second_type
&
1203 operator()(_Pair
& __x
) const
1204 { return __x
.second
; }
1206 const typename
_Pair::second_type
&
1207 operator()(const _Pair
& __x
) const
1208 { return __x
.second
; }
1211 // 20.3.8 adaptors pointers members
1212 /** @defgroup ptrmem_adaptors Adaptors for pointers to members
1215 * There are a total of 8 = 2^3 function objects in this family.
1216 * (1) Member functions taking no arguments vs member functions taking
1218 * (2) Call through pointer vs call through reference.
1219 * (3) Const vs non-const member function.
1221 * All of this complexity is in the function objects themselves. You can
1222 * ignore it by using the helper function `mem_fun` and `mem_fun_ref`,
1223 * which create whichever type of adaptor is appropriate.
1225 * @deprecated Deprecated in C++11, no longer in the standard since C++17.
1226 * Use `mem_fn` instead.
1230 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1231 template<typename _Ret
, typename _Tp
>
1232 class mem_fun_t
: public unary_function
<_Tp
*, _Ret
>
1236 mem_fun_t(_Ret (_Tp::*__pf
)())
1240 operator()(_Tp
* __p
) const
1241 { return (__p
->*_M_f
)(); }
1244 _Ret (_Tp::*_M_f
)();
1245 } _GLIBCXX11_DEPRECATED
;
1247 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1248 template<typename _Ret
, typename _Tp
>
1249 class const_mem_fun_t
: public unary_function
<const _Tp
*, _Ret
>
1253 const_mem_fun_t(_Ret (_Tp::*__pf
)() const)
1257 operator()(const _Tp
* __p
) const
1258 { return (__p
->*_M_f
)(); }
1261 _Ret (_Tp::*_M_f
)() const;
1262 } _GLIBCXX11_DEPRECATED
;
1264 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1265 template<typename _Ret
, typename _Tp
>
1266 class mem_fun_ref_t
: public unary_function
<_Tp
, _Ret
>
1270 mem_fun_ref_t(_Ret (_Tp::*__pf
)())
1274 operator()(_Tp
& __r
) const
1275 { return (__r
.*_M_f
)(); }
1278 _Ret (_Tp::*_M_f
)();
1279 } _GLIBCXX11_DEPRECATED
;
1281 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1282 template<typename _Ret
, typename _Tp
>
1283 class const_mem_fun_ref_t
: public unary_function
<_Tp
, _Ret
>
1287 const_mem_fun_ref_t(_Ret (_Tp::*__pf
)() const)
1291 operator()(const _Tp
& __r
) const
1292 { return (__r
.*_M_f
)(); }
1295 _Ret (_Tp::*_M_f
)() const;
1296 } _GLIBCXX11_DEPRECATED
;
1298 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1299 template<typename _Ret
, typename _Tp
, typename _Arg
>
1300 class mem_fun1_t
: public binary_function
<_Tp
*, _Arg
, _Ret
>
1304 mem_fun1_t(_Ret (_Tp::*__pf
)(_Arg
))
1308 operator()(_Tp
* __p
, _Arg __x
) const
1309 { return (__p
->*_M_f
)(__x
); }
1312 _Ret (_Tp::*_M_f
)(_Arg
);
1313 } _GLIBCXX11_DEPRECATED
;
1315 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1316 template<typename _Ret
, typename _Tp
, typename _Arg
>
1317 class const_mem_fun1_t
: public binary_function
<const _Tp
*, _Arg
, _Ret
>
1321 const_mem_fun1_t(_Ret (_Tp::*__pf
)(_Arg
) const)
1325 operator()(const _Tp
* __p
, _Arg __x
) const
1326 { return (__p
->*_M_f
)(__x
); }
1329 _Ret (_Tp::*_M_f
)(_Arg
) const;
1330 } _GLIBCXX11_DEPRECATED
;
1332 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1333 template<typename _Ret
, typename _Tp
, typename _Arg
>
1334 class mem_fun1_ref_t
: public binary_function
<_Tp
, _Arg
, _Ret
>
1338 mem_fun1_ref_t(_Ret (_Tp::*__pf
)(_Arg
))
1342 operator()(_Tp
& __r
, _Arg __x
) const
1343 { return (__r
.*_M_f
)(__x
); }
1346 _Ret (_Tp::*_M_f
)(_Arg
);
1347 } _GLIBCXX11_DEPRECATED
;
1349 /// One of the @link ptrmem_adaptors adaptors for member pointers@endlink.
1350 template<typename _Ret
, typename _Tp
, typename _Arg
>
1351 class const_mem_fun1_ref_t
: public binary_function
<_Tp
, _Arg
, _Ret
>
1355 const_mem_fun1_ref_t(_Ret (_Tp::*__pf
)(_Arg
) const)
1359 operator()(const _Tp
& __r
, _Arg __x
) const
1360 { return (__r
.*_M_f
)(__x
); }
1363 _Ret (_Tp::*_M_f
)(_Arg
) const;
1364 } _GLIBCXX11_DEPRECATED
;
1366 // Mem_fun adaptor helper functions. There are only two:
1367 // mem_fun and mem_fun_ref.
1368 template<typename _Ret
, typename _Tp
>
1369 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1370 inline mem_fun_t
<_Ret
, _Tp
>
1371 mem_fun(_Ret (_Tp::*__f
)())
1372 { return mem_fun_t
<_Ret
, _Tp
>(__f
); }
1374 template<typename _Ret
, typename _Tp
>
1375 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1376 inline const_mem_fun_t
<_Ret
, _Tp
>
1377 mem_fun(_Ret (_Tp::*__f
)() const)
1378 { return const_mem_fun_t
<_Ret
, _Tp
>(__f
); }
1380 template<typename _Ret
, typename _Tp
>
1381 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1382 inline mem_fun_ref_t
<_Ret
, _Tp
>
1383 mem_fun_ref(_Ret (_Tp::*__f
)())
1384 { return mem_fun_ref_t
<_Ret
, _Tp
>(__f
); }
1386 template<typename _Ret
, typename _Tp
>
1387 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1388 inline const_mem_fun_ref_t
<_Ret
, _Tp
>
1389 mem_fun_ref(_Ret (_Tp::*__f
)() const)
1390 { return const_mem_fun_ref_t
<_Ret
, _Tp
>(__f
); }
1392 template<typename _Ret
, typename _Tp
, typename _Arg
>
1393 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1394 inline mem_fun1_t
<_Ret
, _Tp
, _Arg
>
1395 mem_fun(_Ret (_Tp::*__f
)(_Arg
))
1396 { return mem_fun1_t
<_Ret
, _Tp
, _Arg
>(__f
); }
1398 template<typename _Ret
, typename _Tp
, typename _Arg
>
1399 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1400 inline const_mem_fun1_t
<_Ret
, _Tp
, _Arg
>
1401 mem_fun(_Ret (_Tp::*__f
)(_Arg
) const)
1402 { return const_mem_fun1_t
<_Ret
, _Tp
, _Arg
>(__f
); }
1404 template<typename _Ret
, typename _Tp
, typename _Arg
>
1405 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1406 inline mem_fun1_ref_t
<_Ret
, _Tp
, _Arg
>
1407 mem_fun_ref(_Ret (_Tp::*__f
)(_Arg
))
1408 { return mem_fun1_ref_t
<_Ret
, _Tp
, _Arg
>(__f
); }
1410 template<typename _Ret
, typename _Tp
, typename _Arg
>
1411 _GLIBCXX11_DEPRECATED_SUGGEST("std::mem_fn")
1412 inline const_mem_fun1_ref_t
<_Ret
, _Tp
, _Arg
>
1413 mem_fun_ref(_Ret (_Tp::*__f
)(_Arg
) const)
1414 { return const_mem_fun1_ref_t
<_Ret
, _Tp
, _Arg
>(__f
); }
1415 #pragma GCC diagnostic pop
1419 #if __cplusplus >= 201402L
1420 template<typename _Func
, typename _SfinaeType
, typename
= __void_t
<>>
1421 struct __has_is_transparent
1424 template<typename _Func
, typename _SfinaeType
>
1425 struct __has_is_transparent
<_Func
, _SfinaeType
,
1426 __void_t
<typename
_Func::is_transparent
>>
1427 { typedef void type
; };
1429 template<typename _Func
, typename _SfinaeType
>
1430 using __has_is_transparent_t
1431 = typename __has_is_transparent
<_Func
, _SfinaeType
>::type
;
1434 _GLIBCXX_END_NAMESPACE_VERSION
1437 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
1438 # include <backward/binders.h>
1441 #endif /* _STL_FUNCTION_H */