56 #ifndef _STL_FUNCTION_H 57 #define _STL_FUNCTION_H 1 59 #if __cplusplus > 201103L 63 namespace std _GLIBCXX_VISIBILITY(default)
65 _GLIBCXX_BEGIN_NAMESPACE_VERSION
104 template<
typename _Arg,
typename _Result>
117 template<
typename _Arg1,
typename _Arg2,
typename _Result>
143 #if __cplusplus > 201103L 144 struct __is_transparent;
146 template<
typename _Tp =
void>
149 template<
typename _Tp =
void>
152 template<
typename _Tp =
void>
155 template<
typename _Tp =
void>
158 template<
typename _Tp =
void>
161 template<
typename _Tp =
void>
166 template<
typename _Tp>
171 operator()(
const _Tp& __x,
const _Tp& __y)
const 172 {
return __x + __y; }
176 template<
typename _Tp>
177 struct minus :
public binary_function<_Tp, _Tp, _Tp>
181 operator()(
const _Tp& __x,
const _Tp& __y)
const 182 {
return __x - __y; }
186 template<
typename _Tp>
187 struct multiplies :
public binary_function<_Tp, _Tp, _Tp>
191 operator()(
const _Tp& __x,
const _Tp& __y)
const 192 {
return __x * __y; }
196 template<
typename _Tp>
197 struct divides :
public binary_function<_Tp, _Tp, _Tp>
201 operator()(
const _Tp& __x,
const _Tp& __y)
const 202 {
return __x / __y; }
206 template<
typename _Tp>
207 struct modulus :
public binary_function<_Tp, _Tp, _Tp>
211 operator()(
const _Tp& __x,
const _Tp& __y)
const 212 {
return __x % __y; }
216 template<
typename _Tp>
217 struct negate :
public unary_function<_Tp, _Tp>
221 operator()(
const _Tp& __x)
const 225 #if __cplusplus > 201103L 227 #define __cpp_lib_transparent_operators 201510 232 template <
typename _Tp,
typename _Up>
235 operator()(_Tp&& __t, _Up&& __u)
const 236 noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u)))
237 -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u))
238 {
return std::forward<_Tp>(__t) + std::forward<_Up>(__u); }
240 typedef __is_transparent is_transparent;
247 template <
typename _Tp,
typename _Up>
250 operator()(_Tp&& __t, _Up&& __u)
const 251 noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u)))
252 -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u))
253 {
return std::forward<_Tp>(__t) - std::forward<_Up>(__u); }
255 typedef __is_transparent is_transparent;
262 template <
typename _Tp,
typename _Up>
265 operator()(_Tp&& __t, _Up&& __u)
const 266 noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u)))
267 -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u))
268 {
return std::forward<_Tp>(__t) * std::forward<_Up>(__u); }
270 typedef __is_transparent is_transparent;
277 template <
typename _Tp,
typename _Up>
280 operator()(_Tp&& __t, _Up&& __u)
const 281 noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u)))
282 -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u))
283 {
return std::forward<_Tp>(__t) / std::forward<_Up>(__u); }
285 typedef __is_transparent is_transparent;
292 template <
typename _Tp,
typename _Up>
295 operator()(_Tp&& __t, _Up&& __u)
const 296 noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u)))
297 -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u))
298 {
return std::forward<_Tp>(__t) % std::forward<_Up>(__u); }
300 typedef __is_transparent is_transparent;
307 template <
typename _Tp>
310 operator()(_Tp&& __t)
const 311 noexcept(noexcept(-std::forward<_Tp>(__t)))
312 -> decltype(-std::forward<_Tp>(__t))
313 {
return -std::forward<_Tp>(__t); }
315 typedef __is_transparent is_transparent;
329 #if __cplusplus > 201103L 330 template<
typename _Tp =
void>
333 template<
typename _Tp =
void>
336 template<
typename _Tp =
void>
339 template<
typename _Tp =
void>
342 template<
typename _Tp =
void>
345 template<
typename _Tp =
void>
350 template<
typename _Tp>
355 operator()(
const _Tp& __x,
const _Tp& __y)
const 356 {
return __x == __y; }
360 template<
typename _Tp>
361 struct not_equal_to :
public binary_function<_Tp, _Tp, bool>
365 operator()(
const _Tp& __x,
const _Tp& __y)
const 366 {
return __x != __y; }
370 template<
typename _Tp>
371 struct greater :
public binary_function<_Tp, _Tp, bool>
375 operator()(
const _Tp& __x,
const _Tp& __y)
const 376 {
return __x > __y; }
380 template<
typename _Tp>
381 struct less :
public binary_function<_Tp, _Tp, bool>
385 operator()(
const _Tp& __x,
const _Tp& __y)
const 386 {
return __x < __y; }
390 template<
typename _Tp>
391 struct greater_equal :
public binary_function<_Tp, _Tp, bool>
395 operator()(
const _Tp& __x,
const _Tp& __y)
const 396 {
return __x >= __y; }
400 template<
typename _Tp>
401 struct less_equal :
public binary_function<_Tp, _Tp, bool>
405 operator()(
const _Tp& __x,
const _Tp& __y)
const 406 {
return __x <= __y; }
410 template<
typename _Tp>
411 struct greater<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
413 _GLIBCXX14_CONSTEXPR
bool 414 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
416 #if __cplusplus >= 201402L 417 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 418 if (__builtin_is_constant_evaluated())
420 if (__builtin_constant_p(__x > __y))
424 return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y;
429 template<
typename _Tp>
430 struct less<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
432 _GLIBCXX14_CONSTEXPR
bool 433 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
435 #if __cplusplus >= 201402L 436 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 437 if (__builtin_is_constant_evaluated())
439 if (__builtin_constant_p(__x < __y))
443 return (__UINTPTR_TYPE__)__x < (__UINTPTR_TYPE__)__y;
448 template<
typename _Tp>
449 struct greater_equal<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
451 _GLIBCXX14_CONSTEXPR
bool 452 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
454 #if __cplusplus >= 201402L 455 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 456 if (__builtin_is_constant_evaluated())
458 if (__builtin_constant_p(__x >= __y))
462 return (__UINTPTR_TYPE__)__x >= (__UINTPTR_TYPE__)__y;
467 template<
typename _Tp>
468 struct less_equal<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
470 _GLIBCXX14_CONSTEXPR
bool 471 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
473 #if __cplusplus >= 201402L 474 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 475 if (__builtin_is_constant_evaluated())
477 if (__builtin_constant_p(__x <= __y))
481 return (__UINTPTR_TYPE__)__x <= (__UINTPTR_TYPE__)__y;
485 #if __cplusplus >= 201402L 490 template <
typename _Tp,
typename _Up>
492 operator()(_Tp&& __t, _Up&& __u)
const 493 noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))
494 -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u))
495 {
return std::forward<_Tp>(__t) == std::forward<_Up>(__u); }
497 typedef __is_transparent is_transparent;
504 template <
typename _Tp,
typename _Up>
506 operator()(_Tp&& __t, _Up&& __u)
const 507 noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u)))
508 -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u))
509 {
return std::forward<_Tp>(__t) != std::forward<_Up>(__u); }
511 typedef __is_transparent is_transparent;
518 template <
typename _Tp,
typename _Up>
520 operator()(_Tp&& __t, _Up&& __u)
const 521 noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u)))
522 -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u))
524 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
525 __ptr_cmp<_Tp, _Up>{});
528 template<
typename _Tp,
typename _Up>
530 operator()(_Tp* __t, _Up* __u)
const noexcept
533 typedef __is_transparent is_transparent;
536 template <
typename _Tp,
typename _Up>
537 static constexpr decltype(
auto)
539 {
return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }
541 template <
typename _Tp,
typename _Up>
542 static constexpr
bool 543 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
546 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
547 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
551 template<
typename _Tp,
typename _Up,
typename =
void>
552 struct __not_overloaded2 :
true_type { };
555 template<
typename _Tp,
typename _Up>
556 struct __not_overloaded2<_Tp, _Up, __void_t<
557 decltype(
std::declval<_Tp>().operator>(std::declval<_Up>()))>>
561 template<
typename _Tp,
typename _Up,
typename =
void>
562 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
565 template<
typename _Tp,
typename _Up>
566 struct __not_overloaded<_Tp, _Up, __void_t<
567 decltype(operator>(
std::declval<_Tp>(), std::declval<_Up>()))>>
570 template<
typename _Tp,
typename _Up>
571 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
580 template <
typename _Tp,
typename _Up>
582 operator()(_Tp&& __t, _Up&& __u)
const 583 noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))
584 -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u))
586 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
587 __ptr_cmp<_Tp, _Up>{});
590 template<
typename _Tp,
typename _Up>
592 operator()(_Tp* __t, _Up* __u)
const noexcept
595 typedef __is_transparent is_transparent;
598 template <
typename _Tp,
typename _Up>
599 static constexpr decltype(
auto)
601 {
return std::forward<_Tp>(__t) < std::forward<_Up>(__u); }
603 template <
typename _Tp,
typename _Up>
604 static constexpr
bool 605 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
608 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
609 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
613 template<
typename _Tp,
typename _Up,
typename =
void>
614 struct __not_overloaded2 :
true_type { };
617 template<
typename _Tp,
typename _Up>
618 struct __not_overloaded2<_Tp, _Up, __void_t<
619 decltype(
std::declval<_Tp>().operator<(std::declval<_Up>()))>>
623 template<
typename _Tp,
typename _Up,
typename =
void>
624 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
627 template<
typename _Tp,
typename _Up>
628 struct __not_overloaded<_Tp, _Up, __void_t<
629 decltype(operator<(
std::declval<_Tp>(), std::declval<_Up>()))>>
632 template<
typename _Tp,
typename _Up>
633 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
642 template <
typename _Tp,
typename _Up>
644 operator()(_Tp&& __t, _Up&& __u)
const 645 noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)))
646 -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))
648 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
649 __ptr_cmp<_Tp, _Up>{});
652 template<
typename _Tp,
typename _Up>
654 operator()(_Tp* __t, _Up* __u)
const noexcept
657 typedef __is_transparent is_transparent;
660 template <
typename _Tp,
typename _Up>
661 static constexpr decltype(
auto)
663 {
return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); }
665 template <
typename _Tp,
typename _Up>
666 static constexpr
bool 667 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
670 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
671 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
675 template<
typename _Tp,
typename _Up,
typename =
void>
676 struct __not_overloaded2 :
true_type { };
679 template<
typename _Tp,
typename _Up>
680 struct __not_overloaded2<_Tp, _Up, __void_t<
681 decltype(
std::declval<_Tp>().operator>=(std::declval<_Up>()))>>
685 template<
typename _Tp,
typename _Up,
typename =
void>
686 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
689 template<
typename _Tp,
typename _Up>
690 struct __not_overloaded<_Tp, _Up, __void_t<
691 decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>>
694 template<
typename _Tp,
typename _Up>
695 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
704 template <
typename _Tp,
typename _Up>
706 operator()(_Tp&& __t, _Up&& __u)
const 707 noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)))
708 -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))
710 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
711 __ptr_cmp<_Tp, _Up>{});
714 template<
typename _Tp,
typename _Up>
716 operator()(_Tp* __t, _Up* __u)
const noexcept
719 typedef __is_transparent is_transparent;
722 template <
typename _Tp,
typename _Up>
723 static constexpr decltype(
auto)
725 {
return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); }
727 template <
typename _Tp,
typename _Up>
728 static constexpr
bool 729 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
732 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
733 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
737 template<
typename _Tp,
typename _Up,
typename =
void>
738 struct __not_overloaded2 :
true_type { };
741 template<
typename _Tp,
typename _Up>
742 struct __not_overloaded2<_Tp, _Up, __void_t<
743 decltype(
std::declval<_Tp>().operator<=(std::declval<_Up>()))>>
747 template<
typename _Tp,
typename _Up,
typename =
void>
748 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
751 template<
typename _Tp,
typename _Up>
752 struct __not_overloaded<_Tp, _Up, __void_t<
753 decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>>
756 template<
typename _Tp,
typename _Up>
757 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
773 #if __cplusplus > 201103L 774 template<
typename _Tp =
void>
777 template<
typename _Tp =
void>
780 template<
typename _Tp =
void>
785 template<
typename _Tp>
790 operator()(
const _Tp& __x,
const _Tp& __y)
const 791 {
return __x && __y; }
795 template<
typename _Tp>
796 struct logical_or :
public binary_function<_Tp, _Tp, bool>
800 operator()(
const _Tp& __x,
const _Tp& __y)
const 801 {
return __x || __y; }
805 template<
typename _Tp>
806 struct logical_not :
public unary_function<_Tp, bool>
810 operator()(
const _Tp& __x)
const 814 #if __cplusplus > 201103L 819 template <
typename _Tp,
typename _Up>
822 operator()(_Tp&& __t, _Up&& __u)
const 823 noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u)))
824 -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u))
825 {
return std::forward<_Tp>(__t) && std::forward<_Up>(__u); }
827 typedef __is_transparent is_transparent;
834 template <
typename _Tp,
typename _Up>
837 operator()(_Tp&& __t, _Up&& __u)
const 838 noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u)))
839 -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u))
840 {
return std::forward<_Tp>(__t) || std::forward<_Up>(__u); }
842 typedef __is_transparent is_transparent;
849 template <
typename _Tp>
852 operator()(_Tp&& __t)
const 853 noexcept(noexcept(!std::forward<_Tp>(__t)))
854 -> decltype(!std::forward<_Tp>(__t))
855 {
return !std::forward<_Tp>(__t); }
857 typedef __is_transparent is_transparent;
862 #if __cplusplus > 201103L 863 template<
typename _Tp =
void>
866 template<
typename _Tp =
void>
869 template<
typename _Tp =
void>
872 template<
typename _Tp =
void>
878 template<
typename _Tp>
883 operator()(
const _Tp& __x,
const _Tp& __y)
const 884 {
return __x & __y; }
887 template<
typename _Tp>
888 struct bit_or :
public binary_function<_Tp, _Tp, _Tp>
892 operator()(
const _Tp& __x,
const _Tp& __y)
const 893 {
return __x | __y; }
896 template<
typename _Tp>
897 struct bit_xor :
public binary_function<_Tp, _Tp, _Tp>
901 operator()(
const _Tp& __x,
const _Tp& __y)
const 902 {
return __x ^ __y; }
905 template<
typename _Tp>
906 struct bit_not :
public unary_function<_Tp, _Tp>
910 operator()(
const _Tp& __x)
const 914 #if __cplusplus > 201103L 918 template <
typename _Tp,
typename _Up>
921 operator()(_Tp&& __t, _Up&& __u)
const 922 noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u)))
923 -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u))
924 {
return std::forward<_Tp>(__t) & std::forward<_Up>(__u); }
926 typedef __is_transparent is_transparent;
932 template <
typename _Tp,
typename _Up>
935 operator()(_Tp&& __t, _Up&& __u)
const 936 noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u)))
937 -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u))
938 {
return std::forward<_Tp>(__t) | std::forward<_Up>(__u); }
940 typedef __is_transparent is_transparent;
946 template <
typename _Tp,
typename _Up>
949 operator()(_Tp&& __t, _Up&& __u)
const 950 noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)))
951 -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))
952 {
return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); }
954 typedef __is_transparent is_transparent;
960 template <
typename _Tp>
963 operator()(_Tp&& __t)
const 964 noexcept(noexcept(~std::forward<_Tp>(__t)))
965 -> decltype(~std::forward<_Tp>(__t))
966 {
return ~
std::forward<_Tp>(__t); }
968 typedef __is_transparent is_transparent;
1002 template<
typename _Predicate>
1004 :
public unary_function<typename _Predicate::argument_type, bool>
1010 _GLIBCXX14_CONSTEXPR
1014 _GLIBCXX14_CONSTEXPR
1016 operator()(
const typename _Predicate::argument_type& __x)
const 1017 {
return !_M_pred(__x); }
1021 template<
typename _Predicate>
1022 _GLIBCXX14_CONSTEXPR
1028 template<
typename _Predicate>
1031 typename _Predicate::second_argument_type, bool>
1037 _GLIBCXX14_CONSTEXPR
1041 _GLIBCXX14_CONSTEXPR
1043 operator()(
const typename _Predicate::first_argument_type& __x,
1044 const typename _Predicate::second_argument_type& __y)
const 1045 {
return !_M_pred(__x, __y); }
1049 template<
typename _Predicate>
1050 _GLIBCXX14_CONSTEXPR
1079 template<
typename _Arg,
typename _Result>
1083 _Result (*_M_ptr)(_Arg);
1093 operator()(_Arg __x)
const 1094 {
return _M_ptr(__x); }
1098 template<
typename _Arg,
typename _Result>
1104 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1109 _Result (*_M_ptr)(_Arg1, _Arg2);
1119 operator()(_Arg1 __x, _Arg2 __y)
const 1120 {
return _M_ptr(__x, __y); }
1124 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1130 template<
typename _Tp>
1132 :
public unary_function<_Tp, _Tp>
1135 operator()(_Tp& __x)
const 1139 operator()(
const _Tp& __x)
const 1144 template<
typename _Tp>
struct _Identity<const _Tp> : _Identity<_Tp> { };
1146 template<
typename _Pair>
1148 :
public unary_function<_Pair, typename _Pair::first_type>
1150 typename _Pair::first_type&
1151 operator()(_Pair& __x)
const 1152 {
return __x.first; }
1154 const typename _Pair::first_type&
1155 operator()(
const _Pair& __x)
const 1156 {
return __x.first; }
1158 #if __cplusplus >= 201103L 1159 template<
typename _Pair2>
1160 typename _Pair2::first_type&
1161 operator()(_Pair2& __x)
const 1162 {
return __x.first; }
1164 template<
typename _Pair2>
1165 const typename _Pair2::first_type&
1166 operator()(
const _Pair2& __x)
const 1167 {
return __x.first; }
1171 template<
typename _Pair>
1173 :
public unary_function<_Pair, typename _Pair::second_type>
1175 typename _Pair::second_type&
1176 operator()(_Pair& __x)
const 1177 {
return __x.second; }
1179 const typename _Pair::second_type&
1180 operator()(
const _Pair& __x)
const 1181 {
return __x.second; }
1202 template<
typename _Ret,
typename _Tp>
1211 operator()(_Tp* __p)
const 1212 {
return (__p->*_M_f)(); }
1215 _Ret (_Tp::*_M_f)();
1220 template<
typename _Ret,
typename _Tp>
1229 operator()(
const _Tp* __p)
const 1230 {
return (__p->*_M_f)(); }
1233 _Ret (_Tp::*_M_f)()
const;
1238 template<
typename _Ret,
typename _Tp>
1247 operator()(_Tp& __r)
const 1248 {
return (__r.*_M_f)(); }
1251 _Ret (_Tp::*_M_f)();
1256 template<
typename _Ret,
typename _Tp>
1265 operator()(
const _Tp& __r)
const 1266 {
return (__r.*_M_f)(); }
1269 _Ret (_Tp::*_M_f)()
const;
1274 template<
typename _Ret,
typename _Tp,
typename _Arg>
1283 operator()(_Tp* __p, _Arg __x)
const 1284 {
return (__p->*_M_f)(__x); }
1287 _Ret (_Tp::*_M_f)(_Arg);
1292 template<
typename _Ret,
typename _Tp,
typename _Arg>
1301 operator()(
const _Tp* __p, _Arg __x)
const 1302 {
return (__p->*_M_f)(__x); }
1305 _Ret (_Tp::*_M_f)(_Arg)
const;
1310 template<
typename _Ret,
typename _Tp,
typename _Arg>
1319 operator()(_Tp& __r, _Arg __x)
const 1320 {
return (__r.*_M_f)(__x); }
1323 _Ret (_Tp::*_M_f)(_Arg);
1328 template<
typename _Ret,
typename _Tp,
typename _Arg>
1337 operator()(
const _Tp& __r, _Arg __x)
const 1338 {
return (__r.*_M_f)(__x); }
1341 _Ret (_Tp::*_M_f)(_Arg)
const;
1346 template<
typename _Ret,
typename _Tp>
1348 mem_fun(_Ret (_Tp::*__f)())
1351 template<
typename _Ret,
typename _Tp>
1352 inline const_mem_fun_t<_Ret, _Tp>
1353 mem_fun(_Ret (_Tp::*__f)()
const)
1354 {
return const_mem_fun_t<_Ret, _Tp>(__f); }
1356 template<
typename _Ret,
typename _Tp>
1357 inline mem_fun_ref_t<_Ret, _Tp>
1358 mem_fun_ref(_Ret (_Tp::*__f)())
1359 {
return mem_fun_ref_t<_Ret, _Tp>(__f); }
1361 template<
typename _Ret,
typename _Tp>
1362 inline const_mem_fun_ref_t<_Ret, _Tp>
1363 mem_fun_ref(_Ret (_Tp::*__f)()
const)
1364 {
return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
1366 template<
typename _Ret,
typename _Tp,
typename _Arg>
1367 inline mem_fun1_t<_Ret, _Tp, _Arg>
1368 mem_fun(_Ret (_Tp::*__f)(_Arg))
1369 {
return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1371 template<
typename _Ret,
typename _Tp,
typename _Arg>
1372 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
1373 mem_fun(_Ret (_Tp::*__f)(_Arg)
const)
1374 {
return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1376 template<
typename _Ret,
typename _Tp,
typename _Arg>
1377 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
1378 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
1379 {
return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1381 template<
typename _Ret,
typename _Tp,
typename _Arg>
1382 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
1383 mem_fun_ref(_Ret (_Tp::*__f)(_Arg)
const)
1384 {
return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1388 _GLIBCXX_END_NAMESPACE_VERSION
1391 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED One of the adaptors for member pointers.
_GLIBCXX14_CONSTEXPR binary_negate< _Predicate > not2(const _Predicate &__pred)
One of the negation functors.
One of the math functors.
pointer_to_unary_function< _Arg, _Result > ptr_fun(_Result(*__x)(_Arg))
One of the adaptors for function pointers.
One of the math functors.
One of the adaptors for member pointers.
ISO C++ entities toplevel namespace is std.
One of the adaptors for function pointers.
One of the negation functors.
One of the math functors.
One of the math functors.
_Arg1 first_argument_type
first_argument_type is the type of the first argument
One of the adaptors for function pointers.
_Arg argument_type
argument_type is the type of the argument
_Arg2 second_argument_type
second_argument_type is the type of the second argument
_Result result_type
result_type is the return type
One of the comparison functors.
One of the adaptors for member pointers.
One of the Boolean operations functors.
One of the comparison functors.
One of the adaptors for member pointers.
One of the math functors.
One of the comparison functors.
One of the adaptors for member pointers.
One of the Boolean operations functors.
One of the negation functors.
One of the adaptors for member pointers.
One of the comparison functors.
_GLIBCXX14_CONSTEXPR unary_negate< _Predicate > not1(const _Predicate &__pred)
One of the negation functors.
One of the comparison functors.
One of the math functors.
One of the adaptors for member pointers.
_Result result_type
result_type is the return type
One of the adaptors for member pointers.
One of the Boolean operations functors.
One of the comparison functors.