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 (__builtin_constant_p (__x > __y))
418 return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y;
423 template<
typename _Tp>
424 struct less<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
426 _GLIBCXX14_CONSTEXPR
bool 427 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
429 if (__builtin_constant_p (__x < __y))
431 return (__UINTPTR_TYPE__)__x < (__UINTPTR_TYPE__)__y;
436 template<
typename _Tp>
437 struct greater_equal<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
439 _GLIBCXX14_CONSTEXPR
bool 440 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
442 if (__builtin_constant_p (__x >= __y))
444 return (__UINTPTR_TYPE__)__x >= (__UINTPTR_TYPE__)__y;
449 template<
typename _Tp>
450 struct less_equal<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
452 _GLIBCXX14_CONSTEXPR
bool 453 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
455 if (__builtin_constant_p (__x <= __y))
457 return (__UINTPTR_TYPE__)__x <= (__UINTPTR_TYPE__)__y;
461 #if __cplusplus >= 201402L 466 template <
typename _Tp,
typename _Up>
468 operator()(_Tp&& __t, _Up&& __u)
const 469 noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))
470 -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u))
471 {
return std::forward<_Tp>(__t) == std::forward<_Up>(__u); }
473 typedef __is_transparent is_transparent;
480 template <
typename _Tp,
typename _Up>
482 operator()(_Tp&& __t, _Up&& __u)
const 483 noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u)))
484 -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u))
485 {
return std::forward<_Tp>(__t) != std::forward<_Up>(__u); }
487 typedef __is_transparent is_transparent;
494 template <
typename _Tp,
typename _Up>
496 operator()(_Tp&& __t, _Up&& __u)
const 497 noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u)))
498 -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u))
500 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
501 __ptr_cmp<_Tp, _Up>{});
504 template<
typename _Tp,
typename _Up>
506 operator()(_Tp* __t, _Up* __u)
const noexcept
509 typedef __is_transparent is_transparent;
512 template <
typename _Tp,
typename _Up>
513 static constexpr decltype(
auto)
515 {
return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }
517 template <
typename _Tp,
typename _Up>
518 static constexpr
bool 519 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
522 static_cast<const volatile void*>(std::forward<_Tp>(__t)),
523 static_cast<const volatile void*>(std::forward<_Up>(__u)));
527 template<
typename _Tp,
typename _Up,
typename =
void>
528 struct __not_overloaded2 :
true_type { };
531 template<
typename _Tp,
typename _Up>
532 struct __not_overloaded2<_Tp, _Up, __void_t<
533 decltype(
std::declval<_Tp>().operator>(std::declval<_Up>()))>>
537 template<
typename _Tp,
typename _Up,
typename =
void>
538 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
541 template<
typename _Tp,
typename _Up>
542 struct __not_overloaded<_Tp, _Up, __void_t<
543 decltype(operator>(
std::declval<_Tp>(), std::declval<_Up>()))>>
546 template<
typename _Tp,
typename _Up>
547 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
556 template <
typename _Tp,
typename _Up>
558 operator()(_Tp&& __t, _Up&& __u)
const 559 noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))
560 -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u))
562 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
563 __ptr_cmp<_Tp, _Up>{});
566 template<
typename _Tp,
typename _Up>
568 operator()(_Tp* __t, _Up* __u)
const noexcept
571 typedef __is_transparent is_transparent;
574 template <
typename _Tp,
typename _Up>
575 static constexpr decltype(
auto)
577 {
return std::forward<_Tp>(__t) < std::forward<_Up>(__u); }
579 template <
typename _Tp,
typename _Up>
580 static constexpr
bool 581 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
584 static_cast<const volatile void*>(std::forward<_Tp>(__t)),
585 static_cast<const volatile void*>(std::forward<_Up>(__u)));
589 template<
typename _Tp,
typename _Up,
typename =
void>
590 struct __not_overloaded2 :
true_type { };
593 template<
typename _Tp,
typename _Up>
594 struct __not_overloaded2<_Tp, _Up, __void_t<
595 decltype(
std::declval<_Tp>().operator<(std::declval<_Up>()))>>
599 template<
typename _Tp,
typename _Up,
typename =
void>
600 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
603 template<
typename _Tp,
typename _Up>
604 struct __not_overloaded<_Tp, _Up, __void_t<
605 decltype(operator<(
std::declval<_Tp>(), std::declval<_Up>()))>>
608 template<
typename _Tp,
typename _Up>
609 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
618 template <
typename _Tp,
typename _Up>
620 operator()(_Tp&& __t, _Up&& __u)
const 621 noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)))
622 -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))
624 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
625 __ptr_cmp<_Tp, _Up>{});
628 template<
typename _Tp,
typename _Up>
630 operator()(_Tp* __t, _Up* __u)
const noexcept
633 typedef __is_transparent is_transparent;
636 template <
typename _Tp,
typename _Up>
637 static constexpr decltype(
auto)
639 {
return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); }
641 template <
typename _Tp,
typename _Up>
642 static constexpr
bool 643 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
646 static_cast<const volatile void*>(std::forward<_Tp>(__t)),
647 static_cast<const volatile void*>(std::forward<_Up>(__u)));
651 template<
typename _Tp,
typename _Up,
typename =
void>
652 struct __not_overloaded2 :
true_type { };
655 template<
typename _Tp,
typename _Up>
656 struct __not_overloaded2<_Tp, _Up, __void_t<
657 decltype(
std::declval<_Tp>().operator>=(std::declval<_Up>()))>>
661 template<
typename _Tp,
typename _Up,
typename =
void>
662 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
665 template<
typename _Tp,
typename _Up>
666 struct __not_overloaded<_Tp, _Up, __void_t<
667 decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>>
670 template<
typename _Tp,
typename _Up>
671 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
680 template <
typename _Tp,
typename _Up>
682 operator()(_Tp&& __t, _Up&& __u)
const 683 noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)))
684 -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))
686 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
687 __ptr_cmp<_Tp, _Up>{});
690 template<
typename _Tp,
typename _Up>
692 operator()(_Tp* __t, _Up* __u)
const noexcept
695 typedef __is_transparent is_transparent;
698 template <
typename _Tp,
typename _Up>
699 static constexpr decltype(
auto)
701 {
return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); }
703 template <
typename _Tp,
typename _Up>
704 static constexpr
bool 705 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
708 static_cast<const volatile void*>(std::forward<_Tp>(__t)),
709 static_cast<const volatile void*>(std::forward<_Up>(__u)));
713 template<
typename _Tp,
typename _Up,
typename =
void>
714 struct __not_overloaded2 :
true_type { };
717 template<
typename _Tp,
typename _Up>
718 struct __not_overloaded2<_Tp, _Up, __void_t<
719 decltype(
std::declval<_Tp>().operator<=(std::declval<_Up>()))>>
723 template<
typename _Tp,
typename _Up,
typename =
void>
724 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
727 template<
typename _Tp,
typename _Up>
728 struct __not_overloaded<_Tp, _Up, __void_t<
729 decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>>
732 template<
typename _Tp,
typename _Up>
733 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
749 #if __cplusplus > 201103L 750 template<
typename _Tp =
void>
753 template<
typename _Tp =
void>
756 template<
typename _Tp =
void>
761 template<
typename _Tp>
766 operator()(
const _Tp& __x,
const _Tp& __y)
const 767 {
return __x && __y; }
771 template<
typename _Tp>
772 struct logical_or :
public binary_function<_Tp, _Tp, bool>
776 operator()(
const _Tp& __x,
const _Tp& __y)
const 777 {
return __x || __y; }
781 template<
typename _Tp>
782 struct logical_not :
public unary_function<_Tp, bool>
786 operator()(
const _Tp& __x)
const 790 #if __cplusplus > 201103L 795 template <
typename _Tp,
typename _Up>
798 operator()(_Tp&& __t, _Up&& __u)
const 799 noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u)))
800 -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u))
801 {
return std::forward<_Tp>(__t) && std::forward<_Up>(__u); }
803 typedef __is_transparent is_transparent;
810 template <
typename _Tp,
typename _Up>
813 operator()(_Tp&& __t, _Up&& __u)
const 814 noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u)))
815 -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u))
816 {
return std::forward<_Tp>(__t) || std::forward<_Up>(__u); }
818 typedef __is_transparent is_transparent;
825 template <
typename _Tp>
828 operator()(_Tp&& __t)
const 829 noexcept(noexcept(!std::forward<_Tp>(__t)))
830 -> decltype(!std::forward<_Tp>(__t))
831 {
return !std::forward<_Tp>(__t); }
833 typedef __is_transparent is_transparent;
838 #if __cplusplus > 201103L 839 template<
typename _Tp =
void>
842 template<
typename _Tp =
void>
845 template<
typename _Tp =
void>
848 template<
typename _Tp =
void>
854 template<
typename _Tp>
859 operator()(
const _Tp& __x,
const _Tp& __y)
const 860 {
return __x & __y; }
863 template<
typename _Tp>
864 struct bit_or :
public binary_function<_Tp, _Tp, _Tp>
868 operator()(
const _Tp& __x,
const _Tp& __y)
const 869 {
return __x | __y; }
872 template<
typename _Tp>
873 struct bit_xor :
public binary_function<_Tp, _Tp, _Tp>
877 operator()(
const _Tp& __x,
const _Tp& __y)
const 878 {
return __x ^ __y; }
881 template<
typename _Tp>
882 struct bit_not :
public unary_function<_Tp, _Tp>
886 operator()(
const _Tp& __x)
const 890 #if __cplusplus > 201103L 894 template <
typename _Tp,
typename _Up>
897 operator()(_Tp&& __t, _Up&& __u)
const 898 noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u)))
899 -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u))
900 {
return std::forward<_Tp>(__t) & std::forward<_Up>(__u); }
902 typedef __is_transparent is_transparent;
908 template <
typename _Tp,
typename _Up>
911 operator()(_Tp&& __t, _Up&& __u)
const 912 noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u)))
913 -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u))
914 {
return std::forward<_Tp>(__t) | std::forward<_Up>(__u); }
916 typedef __is_transparent is_transparent;
922 template <
typename _Tp,
typename _Up>
925 operator()(_Tp&& __t, _Up&& __u)
const 926 noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)))
927 -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))
928 {
return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); }
930 typedef __is_transparent is_transparent;
936 template <
typename _Tp>
939 operator()(_Tp&& __t)
const 940 noexcept(noexcept(~std::forward<_Tp>(__t)))
941 -> decltype(~std::forward<_Tp>(__t))
942 {
return ~
std::forward<_Tp>(__t); }
944 typedef __is_transparent is_transparent;
978 template<
typename _Predicate>
992 operator()(
const typename _Predicate::argument_type& __x)
const 993 {
return !_M_pred(__x); }
997 template<
typename _Predicate>
1004 template<
typename _Predicate>
1007 typename _Predicate::second_argument_type, bool>
1013 _GLIBCXX14_CONSTEXPR
1017 _GLIBCXX14_CONSTEXPR
1019 operator()(
const typename _Predicate::first_argument_type& __x,
1020 const typename _Predicate::second_argument_type& __y)
const 1021 {
return !_M_pred(__x, __y); }
1025 template<
typename _Predicate>
1026 _GLIBCXX14_CONSTEXPR
1055 template<
typename _Arg,
typename _Result>
1059 _Result (*_M_ptr)(_Arg);
1069 operator()(_Arg __x)
const 1070 {
return _M_ptr(__x); }
1074 template<
typename _Arg,
typename _Result>
1080 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1085 _Result (*_M_ptr)(_Arg1, _Arg2);
1095 operator()(_Arg1 __x, _Arg2 __y)
const 1096 {
return _M_ptr(__x, __y); }
1100 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1106 template<
typename _Tp>
1108 :
public unary_function<_Tp, _Tp>
1111 operator()(_Tp& __x)
const 1115 operator()(
const _Tp& __x)
const 1120 template<
typename _Tp>
struct _Identity<const _Tp> : _Identity<_Tp> { };
1122 template<
typename _Pair>
1124 :
public unary_function<_Pair, typename _Pair::first_type>
1126 typename _Pair::first_type&
1127 operator()(_Pair& __x)
const 1128 {
return __x.first; }
1130 const typename _Pair::first_type&
1131 operator()(
const _Pair& __x)
const 1132 {
return __x.first; }
1134 #if __cplusplus >= 201103L 1135 template<
typename _Pair2>
1136 typename _Pair2::first_type&
1137 operator()(_Pair2& __x)
const 1138 {
return __x.first; }
1140 template<
typename _Pair2>
1141 const typename _Pair2::first_type&
1142 operator()(
const _Pair2& __x)
const 1143 {
return __x.first; }
1147 template<
typename _Pair>
1149 :
public unary_function<_Pair, typename _Pair::second_type>
1151 typename _Pair::second_type&
1152 operator()(_Pair& __x)
const 1153 {
return __x.second; }
1155 const typename _Pair::second_type&
1156 operator()(
const _Pair& __x)
const 1157 {
return __x.second; }
1178 template<
typename _Ret,
typename _Tp>
1187 operator()(_Tp* __p)
const 1188 {
return (__p->*_M_f)(); }
1191 _Ret (_Tp::*_M_f)();
1196 template<
typename _Ret,
typename _Tp>
1205 operator()(
const _Tp* __p)
const 1206 {
return (__p->*_M_f)(); }
1209 _Ret (_Tp::*_M_f)()
const;
1214 template<
typename _Ret,
typename _Tp>
1223 operator()(_Tp& __r)
const 1224 {
return (__r.*_M_f)(); }
1227 _Ret (_Tp::*_M_f)();
1232 template<
typename _Ret,
typename _Tp>
1241 operator()(
const _Tp& __r)
const 1242 {
return (__r.*_M_f)(); }
1245 _Ret (_Tp::*_M_f)()
const;
1250 template<
typename _Ret,
typename _Tp,
typename _Arg>
1259 operator()(_Tp* __p, _Arg __x)
const 1260 {
return (__p->*_M_f)(__x); }
1263 _Ret (_Tp::*_M_f)(_Arg);
1268 template<
typename _Ret,
typename _Tp,
typename _Arg>
1277 operator()(
const _Tp* __p, _Arg __x)
const 1278 {
return (__p->*_M_f)(__x); }
1281 _Ret (_Tp::*_M_f)(_Arg)
const;
1286 template<
typename _Ret,
typename _Tp,
typename _Arg>
1295 operator()(_Tp& __r, _Arg __x)
const 1296 {
return (__r.*_M_f)(__x); }
1299 _Ret (_Tp::*_M_f)(_Arg);
1304 template<
typename _Ret,
typename _Tp,
typename _Arg>
1313 operator()(
const _Tp& __r, _Arg __x)
const 1314 {
return (__r.*_M_f)(__x); }
1317 _Ret (_Tp::*_M_f)(_Arg)
const;
1322 template<
typename _Ret,
typename _Tp>
1324 mem_fun(_Ret (_Tp::*__f)())
1327 template<
typename _Ret,
typename _Tp>
1328 inline const_mem_fun_t<_Ret, _Tp>
1329 mem_fun(_Ret (_Tp::*__f)()
const)
1330 {
return const_mem_fun_t<_Ret, _Tp>(__f); }
1332 template<
typename _Ret,
typename _Tp>
1333 inline mem_fun_ref_t<_Ret, _Tp>
1334 mem_fun_ref(_Ret (_Tp::*__f)())
1335 {
return mem_fun_ref_t<_Ret, _Tp>(__f); }
1337 template<
typename _Ret,
typename _Tp>
1338 inline const_mem_fun_ref_t<_Ret, _Tp>
1339 mem_fun_ref(_Ret (_Tp::*__f)()
const)
1340 {
return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
1342 template<
typename _Ret,
typename _Tp,
typename _Arg>
1343 inline mem_fun1_t<_Ret, _Tp, _Arg>
1344 mem_fun(_Ret (_Tp::*__f)(_Arg))
1345 {
return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1347 template<
typename _Ret,
typename _Tp,
typename _Arg>
1348 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
1349 mem_fun(_Ret (_Tp::*__f)(_Arg)
const)
1350 {
return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1352 template<
typename _Ret,
typename _Tp,
typename _Arg>
1353 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
1354 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
1355 {
return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1357 template<
typename _Ret,
typename _Tp,
typename _Arg>
1358 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
1359 mem_fun_ref(_Ret (_Tp::*__f)(_Arg)
const)
1360 {
return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1364 _GLIBCXX_END_NAMESPACE_VERSION
1367 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
One of the comparison functors.
One of the comparison functors.
One of the negation functors.
One of the Boolean operations functors.
One of the adaptors for member pointers.
One of the comparison functors.
One of the adaptors for member pointers.
One of the comparison functors.
One of the adaptors for function pointers.
One of the Boolean operations functors.
One of the adaptors for member pointers.
One of the comparison functors.
_Arg argument_type
argument_type is the type of the argument
One of the adaptors for member pointers.
_GLIBCXX14_CONSTEXPR binary_negate< _Predicate > not2(const _Predicate &__pred)
One of the negation functors.
_Result result_type
result_type is the return type
_Arg2 second_argument_type
second_argument_type is the type of the second argument
One of the adaptors for member pointers.
ISO C++ entities toplevel namespace is std.
One of the math functors.
One of the negation functors.
_Arg1 first_argument_type
first_argument_type is the type of the first argument
One of the math functors.
One of the comparison functors.
One of the adaptors for member pointers.
One of the math functors.
One of the math functors.
_Result result_type
result_type is the return type
One of the adaptors for member pointers.
pointer_to_unary_function< _Arg, _Result > ptr_fun(_Result(*__x)(_Arg))
One of the adaptors for function pointers.
One of the adaptors for member pointers.
One of the Boolean operations functors.
One of the adaptors for function pointers.
One of the math functors.
_GLIBCXX14_CONSTEXPR unary_negate< _Predicate > not1(const _Predicate &__pred)
One of the negation functors.
One of the math functors.