56#ifndef _STL_FUNCTION_H
57#define _STL_FUNCTION_H 1
59#if __cplusplus > 201103L
63namespace 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
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>
181 operator()(
const _Tp& __x,
const _Tp&
__y)
const
182 {
return __x -
__y; }
186 template<
typename _Tp>
191 operator()(
const _Tp& __x,
const _Tp&
__y)
const
192 {
return __x *
__y; }
196 template<
typename _Tp>
201 operator()(
const _Tp& __x,
const _Tp&
__y)
const
202 {
return __x /
__y; }
206 template<
typename _Tp>
211 operator()(
const _Tp& __x,
const _Tp&
__y)
const
212 {
return __x %
__y; }
216 template<
typename _Tp>
221 operator()(
const _Tp& __x)
const
225#if __cplusplus > 201103L
227#define __cpp_lib_transparent_operators 201210
232 template <
typename _Tp,
typename _Up>
235 operator()(_Tp&& __t,
_Up&&
__u)
const
240 typedef __is_transparent is_transparent;
247 template <
typename _Tp,
typename _Up>
250 operator()(_Tp&& __t,
_Up&&
__u)
const
262 template <
typename _Tp,
typename _Up>
265 operator()(_Tp&& __t,
_Up&&
__u)
const
277 template <
typename _Tp,
typename _Up>
280 operator()(_Tp&& __t,
_Up&&
__u)
const
292 template <
typename _Tp,
typename _Up>
295 operator()(_Tp&& __t,
_Up&&
__u)
const
307 template <
typename _Tp>
310 operator()(_Tp&& __t)
const
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>
365 operator()(
const _Tp& __x,
const _Tp&
__y)
const
366 {
return __x !=
__y; }
370 template<
typename _Tp>
375 operator()(
const _Tp& __x,
const _Tp&
__y)
const
376 {
return __x >
__y; }
380 template<
typename _Tp>
385 operator()(
const _Tp& __x,
const _Tp&
__y)
const
386 {
return __x <
__y; }
390 template<
typename _Tp>
395 operator()(
const _Tp& __x,
const _Tp&
__y)
const
396 {
return __x >=
__y; }
400 template<
typename _Tp>
405 operator()(
const _Tp& __x,
const _Tp&
__y)
const
406 {
return __x <=
__y; }
409#if __cplusplus > 201103L
414 template <
typename _Tp,
typename _Up>
417 operator()(_Tp&& __t,
_Up&&
__u)
const
429 template <
typename _Tp,
typename _Up>
432 operator()(_Tp&& __t,
_Up&&
__u)
const
444 template <
typename _Tp,
typename _Up>
447 operator()(_Tp&& __t,
_Up&&
__u)
const
459 template <
typename _Tp,
typename _Up>
462 operator()(_Tp&& __t,
_Up&&
__u)
const
474 template <
typename _Tp,
typename _Up>
477 operator()(_Tp&& __t,
_Up&&
__u)
const
489 template <
typename _Tp,
typename _Up>
492 operator()(_Tp&& __t,
_Up&&
__u)
const
511#if __cplusplus > 201103L
512 template<
typename _Tp =
void>
515 template<
typename _Tp =
void>
518 template<
typename _Tp =
void>
523 template<
typename _Tp>
528 operator()(
const _Tp& __x,
const _Tp&
__y)
const
529 {
return __x &&
__y; }
533 template<
typename _Tp>
538 operator()(
const _Tp& __x,
const _Tp&
__y)
const
539 {
return __x ||
__y; }
543 template<
typename _Tp>
548 operator()(
const _Tp& __x)
const
552#if __cplusplus > 201103L
557 template <
typename _Tp,
typename _Up>
560 operator()(_Tp&& __t,
_Up&&
__u)
const
572 template <
typename _Tp,
typename _Up>
575 operator()(_Tp&& __t,
_Up&&
__u)
const
587 template <
typename _Tp>
590 operator()(_Tp&& __t)
const
600#if __cplusplus > 201103L
601 template<
typename _Tp =
void>
604 template<
typename _Tp =
void>
607 template<
typename _Tp =
void>
610 template<
typename _Tp =
void>
616 template<
typename _Tp>
621 operator()(
const _Tp& __x,
const _Tp&
__y)
const
622 {
return __x &
__y; }
625 template<
typename _Tp>
626 struct bit_or :
public binary_function<_Tp, _Tp, _Tp>
630 operator()(
const _Tp& __x,
const _Tp& __y)
const
631 {
return __x | __y; }
634 template<
typename _Tp>
635 struct bit_xor :
public binary_function<_Tp, _Tp, _Tp>
639 operator()(
const _Tp& __x,
const _Tp& __y)
const
640 {
return __x ^ __y; }
643 template<
typename _Tp>
644 struct bit_not :
public unary_function<_Tp, _Tp>
648 operator()(
const _Tp& __x)
const
652#if __cplusplus > 201103L
656 template <
typename _Tp,
typename _Up>
659 operator()(_Tp&& __t, _Up&& __u)
const
664 typedef __is_transparent is_transparent;
670 template <
typename _Tp,
typename _Up>
673 operator()(_Tp&& __t, _Up&& __u)
const
678 typedef __is_transparent is_transparent;
684 template <
typename _Tp,
typename _Up>
687 operator()(_Tp&& __t, _Up&& __u)
const
692 typedef __is_transparent is_transparent;
698 template <
typename _Tp>
701 operator()(_Tp&& __t)
const
702 noexcept(
noexcept(
~std::forward<_Tp>(__t)))
703 ->
decltype(
~std::forward<_Tp>(__t))
704 {
return ~std::forward<_Tp>(__t); }
706 typedef __is_transparent is_transparent;
740 template<
typename _Predicate>
754 operator()(
const typename _Predicate::argument_type& __x)
const
755 {
return !_M_pred(__x); }
759 template<
typename _Predicate>
766 template<
typename _Predicate>
769 typename _Predicate::second_argument_type, bool>
781 operator()(
const typename _Predicate::first_argument_type& __x,
782 const typename _Predicate::second_argument_type&
__y)
const
783 {
return !_M_pred(__x,
__y); }
787 template<
typename _Predicate>
817 template<
typename _Arg,
typename _Result>
821 _Result (*_M_ptr)(_Arg);
831 operator()(_Arg __x)
const
832 {
return _M_ptr(__x); }
836 template<
typename _Arg,
typename _Result>
842 template<
typename _Arg1,
typename _Arg2,
typename _Result>
858 {
return _M_ptr(__x,
__y); }
862 template<
typename _Arg1,
typename _Arg2,
typename _Result>
868 template<
typename _Tp>
870 :
public unary_function<_Tp,_Tp>
873 operator()(_Tp& __x)
const
877 operator()(
const _Tp& __x)
const
881 template<
typename _Pair>
883 :
public unary_function<_Pair, typename _Pair::first_type>
885 typename _Pair::first_type&
886 operator()(_Pair& __x)
const
887 {
return __x.first; }
889 const typename _Pair::first_type&
890 operator()(
const _Pair& __x)
const
891 {
return __x.first; }
893#if __cplusplus >= 201103L
894 template<
typename _Pair2>
895 typename _Pair2::first_type&
896 operator()(_Pair2& __x)
const
897 {
return __x.first; }
899 template<
typename _Pair2>
900 const typename _Pair2::first_type&
901 operator()(
const _Pair2& __x)
const
902 {
return __x.first; }
906 template<
typename _Pair>
908 :
public unary_function<_Pair, typename _Pair::second_type>
910 typename _Pair::second_type&
911 operator()(_Pair& __x)
const
912 {
return __x.second; }
914 const typename _Pair::second_type&
915 operator()(
const _Pair& __x)
const
916 {
return __x.second; }
937 template<
typename _Ret,
typename _Tp>
946 operator()(_Tp* __p)
const
947 {
return (__p->*_M_f)(); }
955 template<
typename _Ret,
typename _Tp>
964 operator()(
const _Tp* __p)
const
965 {
return (__p->*_M_f)(); }
968 _Ret (_Tp::*_M_f)()
const;
973 template<
typename _Ret,
typename _Tp>
982 operator()(_Tp& __r)
const
983 {
return (__r.*_M_f)(); }
991 template<
typename _Ret,
typename _Tp>
1000 operator()(
const _Tp& __r)
const
1001 {
return (__r.*_M_f)(); }
1004 _Ret (_Tp::*_M_f)()
const;
1009 template<
typename _Ret,
typename _Tp,
typename _Arg>
1018 operator()(_Tp* __p, _Arg __x)
const
1019 {
return (__p->*_M_f)(__x); }
1022 _Ret (_Tp::*_M_f)(_Arg);
1027 template<
typename _Ret,
typename _Tp,
typename _Arg>
1036 operator()(
const _Tp* __p, _Arg __x)
const
1037 {
return (__p->*_M_f)(__x); }
1040 _Ret (_Tp::*_M_f)(_Arg)
const;
1045 template<
typename _Ret,
typename _Tp,
typename _Arg>
1054 operator()(_Tp& __r, _Arg __x)
const
1055 {
return (__r.*_M_f)(__x); }
1058 _Ret (_Tp::*_M_f)(_Arg);
1063 template<
typename _Ret,
typename _Tp,
typename _Arg>
1072 operator()(
const _Tp& __r, _Arg __x)
const
1073 {
return (__r.*_M_f)(__x); }
1076 _Ret (_Tp::*_M_f)(_Arg)
const;
1081 template<
typename _Ret,
typename _Tp>
1083 mem_fun(
_Ret (_Tp::*__f)())
1086 template<
typename _Ret,
typename _Tp>
1087 inline const_mem_fun_t<_Ret, _Tp>
1088 mem_fun(_Ret (_Tp::*__f)() const)
1089 {
return const_mem_fun_t<_Ret, _Tp>(__f); }
1091 template<
typename _Ret,
typename _Tp>
1092 inline mem_fun_ref_t<_Ret, _Tp>
1093 mem_fun_ref(_Ret (_Tp::*__f)())
1094 {
return mem_fun_ref_t<_Ret, _Tp>(__f); }
1096 template<
typename _Ret,
typename _Tp>
1097 inline const_mem_fun_ref_t<_Ret, _Tp>
1098 mem_fun_ref(_Ret (_Tp::*__f)() const)
1099 {
return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
1101 template<
typename _Ret,
typename _Tp,
typename _Arg>
1102 inline mem_fun1_t<_Ret, _Tp, _Arg>
1103 mem_fun(_Ret (_Tp::*__f)(_Arg))
1104 {
return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1106 template<
typename _Ret,
typename _Tp,
typename _Arg>
1107 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
1108 mem_fun(_Ret (_Tp::*__f)(_Arg) const)
1109 {
return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1111 template<
typename _Ret,
typename _Tp,
typename _Arg>
1112 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
1113 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
1114 {
return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1116 template<
typename _Ret,
typename _Tp,
typename _Arg>
1117 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
1118 mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
1119 {
return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1123_GLIBCXX_END_NAMESPACE_VERSION
1126#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
_GLIBCXX14_CONSTEXPR binary_negate< _Predicate > not2(const _Predicate &__pred)
One of the negation functors.
_GLIBCXX14_CONSTEXPR unary_negate< _Predicate > not1(const _Predicate &__pred)
One of the negation functors.
pointer_to_unary_function< _Arg, _Result > ptr_fun(_Result(*__x)(_Arg))
One of the adaptors for function pointers.
ISO C++ entities toplevel namespace is std.
_Arg argument_type
argument_type is the type of the argument
_Result result_type
result_type is the return type
_Result result_type
result_type is the return type
_Arg2 second_argument_type
second_argument_type is the type of the second argument
_Arg1 first_argument_type
first_argument_type is the type of the first argument
One of the math functors.
One of the math functors.
One of the math functors.
One of the math functors.
One of the math functors.
One of the math functors.
One of the comparison functors.
One of the comparison functors.
One of the comparison functors.
One of the comparison functors.
One of the comparison functors.
One of the comparison functors.
One of the Boolean operations functors.
One of the Boolean operations functors.
One of the Boolean operations functors.
One of the negation functors.
One of the negation functors.
One of the adaptors for function pointers.
One of the adaptors for function pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.
One of the adaptors for member pointers.