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
116 template<
typename _Arg,
typename _Result>
130 template<
typename _Arg1,
typename _Arg2,
typename _Result>
156 #if __cplusplus > 201103L 157 struct __is_transparent;
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>
179 template<
typename _Tp>
186 {
return __x + __y; }
190 template<
typename _Tp>
191 struct minus :
public binary_function<_Tp, _Tp, _Tp>
195 operator()(
const _Tp& __x,
const _Tp& __y)
const 196 {
return __x - __y; }
200 template<
typename _Tp>
201 struct multiplies :
public binary_function<_Tp, _Tp, _Tp>
205 operator()(
const _Tp& __x,
const _Tp& __y)
const 206 {
return __x * __y; }
210 template<
typename _Tp>
211 struct divides :
public binary_function<_Tp, _Tp, _Tp>
215 operator()(
const _Tp& __x,
const _Tp& __y)
const 216 {
return __x / __y; }
220 template<
typename _Tp>
221 struct modulus :
public binary_function<_Tp, _Tp, _Tp>
225 operator()(
const _Tp& __x,
const _Tp& __y)
const 226 {
return __x % __y; }
230 template<
typename _Tp>
231 struct negate :
public unary_function<_Tp, _Tp>
235 operator()(
const _Tp& __x)
const 239 #if __cplusplus > 201103L 241 #define __cpp_lib_transparent_operators 201510 246 template <
typename _Tp,
typename _Up>
250 noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u)))
251 -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u))
252 {
return std::forward<_Tp>(__t) + std::forward<_Up>(__u); }
254 typedef __is_transparent is_transparent;
261 template <
typename _Tp,
typename _Up>
264 operator()(_Tp&& __t, _Up&& __u)
const 265 noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u)))
266 -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u))
267 {
return std::forward<_Tp>(__t) - std::forward<_Up>(__u); }
269 typedef __is_transparent is_transparent;
276 template <
typename _Tp,
typename _Up>
279 operator()(_Tp&& __t, _Up&& __u)
const 280 noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u)))
281 -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u))
282 {
return std::forward<_Tp>(__t) * std::forward<_Up>(__u); }
284 typedef __is_transparent is_transparent;
291 template <
typename _Tp,
typename _Up>
294 operator()(_Tp&& __t, _Up&& __u)
const 295 noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u)))
296 -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u))
297 {
return std::forward<_Tp>(__t) / std::forward<_Up>(__u); }
299 typedef __is_transparent is_transparent;
306 template <
typename _Tp,
typename _Up>
309 operator()(_Tp&& __t, _Up&& __u)
const 310 noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u)))
311 -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u))
312 {
return std::forward<_Tp>(__t) % std::forward<_Up>(__u); }
314 typedef __is_transparent is_transparent;
321 template <
typename _Tp>
324 operator()(_Tp&& __t)
const 325 noexcept(noexcept(-std::forward<_Tp>(__t)))
326 -> decltype(-std::forward<_Tp>(__t))
327 {
return -std::forward<_Tp>(__t); }
329 typedef __is_transparent is_transparent;
343 #if __cplusplus > 201103L 344 template<
typename _Tp =
void>
347 template<
typename _Tp =
void>
350 template<
typename _Tp =
void>
353 template<
typename _Tp =
void>
356 template<
typename _Tp =
void>
359 template<
typename _Tp =
void>
364 template<
typename _Tp>
369 operator()(
const _Tp& __x,
const _Tp& __y)
const 370 {
return __x == __y; }
374 template<
typename _Tp>
375 struct not_equal_to :
public binary_function<_Tp, _Tp, bool>
379 operator()(
const _Tp& __x,
const _Tp& __y)
const 380 {
return __x != __y; }
384 template<
typename _Tp>
385 struct greater :
public binary_function<_Tp, _Tp, bool>
389 operator()(
const _Tp& __x,
const _Tp& __y)
const 390 {
return __x > __y; }
394 template<
typename _Tp>
395 struct less :
public binary_function<_Tp, _Tp, bool>
399 operator()(
const _Tp& __x,
const _Tp& __y)
const 400 {
return __x < __y; }
404 template<
typename _Tp>
405 struct greater_equal :
public binary_function<_Tp, _Tp, bool>
409 operator()(
const _Tp& __x,
const _Tp& __y)
const 410 {
return __x >= __y; }
414 template<
typename _Tp>
415 struct less_equal :
public binary_function<_Tp, _Tp, bool>
419 operator()(
const _Tp& __x,
const _Tp& __y)
const 420 {
return __x <= __y; }
424 template<
typename _Tp>
425 struct greater<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
427 _GLIBCXX14_CONSTEXPR
bool 428 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
430 #if __cplusplus >= 201402L 431 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 432 if (__builtin_is_constant_evaluated())
434 if (__builtin_constant_p(__x > __y))
438 return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y;
443 template<
typename _Tp>
444 struct less<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
446 _GLIBCXX14_CONSTEXPR
bool 447 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
449 #if __cplusplus >= 201402L 450 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 451 if (__builtin_is_constant_evaluated())
453 if (__builtin_constant_p(__x < __y))
457 return (__UINTPTR_TYPE__)__x < (__UINTPTR_TYPE__)__y;
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 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 470 if (__builtin_is_constant_evaluated())
472 if (__builtin_constant_p(__x >= __y))
476 return (__UINTPTR_TYPE__)__x >= (__UINTPTR_TYPE__)__y;
481 template<
typename _Tp>
482 struct less_equal<_Tp*> :
public binary_function<_Tp*, _Tp*, bool>
484 _GLIBCXX14_CONSTEXPR
bool 485 operator()(_Tp* __x, _Tp* __y)
const _GLIBCXX_NOTHROW
487 #if __cplusplus >= 201402L 488 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 489 if (__builtin_is_constant_evaluated())
491 if (__builtin_constant_p(__x <= __y))
495 return (__UINTPTR_TYPE__)__x <= (__UINTPTR_TYPE__)__y;
499 #if __cplusplus >= 201402L 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))
523 {
return std::forward<_Tp>(__t) != std::forward<_Up>(__u); }
525 typedef __is_transparent is_transparent;
532 template <
typename _Tp,
typename _Up>
534 operator()(_Tp&& __t, _Up&& __u)
const 535 noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u)))
536 -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u))
538 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
539 __ptr_cmp<_Tp, _Up>{});
542 template<
typename _Tp,
typename _Up>
544 operator()(_Tp* __t, _Up* __u)
const noexcept
547 typedef __is_transparent is_transparent;
550 template <
typename _Tp,
typename _Up>
551 static constexpr decltype(
auto)
553 {
return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }
555 template <
typename _Tp,
typename _Up>
556 static constexpr
bool 557 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
560 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
561 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
565 template<
typename _Tp,
typename _Up,
typename =
void>
566 struct __not_overloaded2 :
true_type { };
569 template<
typename _Tp,
typename _Up>
570 struct __not_overloaded2<_Tp, _Up, __void_t<
571 decltype(
std::
declval<_Tp>().operator>(std::declval<_Up>()))>>
575 template<
typename _Tp,
typename _Up,
typename =
void>
576 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
579 template<
typename _Tp,
typename _Up>
580 struct __not_overloaded<_Tp, _Up, __void_t<
584 template<
typename _Tp,
typename _Up>
585 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
594 template <
typename _Tp,
typename _Up>
596 operator()(_Tp&& __t, _Up&& __u)
const 597 noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))
598 -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u))
600 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
601 __ptr_cmp<_Tp, _Up>{});
604 template<
typename _Tp,
typename _Up>
606 operator()(_Tp* __t, _Up* __u)
const noexcept
609 typedef __is_transparent is_transparent;
612 template <
typename _Tp,
typename _Up>
613 static constexpr decltype(
auto)
615 {
return std::forward<_Tp>(__t) < std::forward<_Up>(__u); }
617 template <
typename _Tp,
typename _Up>
618 static constexpr
bool 619 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
622 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
623 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
627 template<
typename _Tp,
typename _Up,
typename =
void>
628 struct __not_overloaded2 :
true_type { };
631 template<
typename _Tp,
typename _Up>
632 struct __not_overloaded2<_Tp, _Up, __void_t<
633 decltype(
std::
declval<_Tp>().operator<(std::declval<_Up>()))>>
637 template<
typename _Tp,
typename _Up,
typename =
void>
638 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
641 template<
typename _Tp,
typename _Up>
642 struct __not_overloaded<_Tp, _Up, __void_t<
646 template<
typename _Tp,
typename _Up>
647 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
656 template <
typename _Tp,
typename _Up>
658 operator()(_Tp&& __t, _Up&& __u)
const 659 noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)))
660 -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))
662 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
663 __ptr_cmp<_Tp, _Up>{});
666 template<
typename _Tp,
typename _Up>
668 operator()(_Tp* __t, _Up* __u)
const noexcept
671 typedef __is_transparent is_transparent;
674 template <
typename _Tp,
typename _Up>
675 static constexpr decltype(
auto)
677 {
return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); }
679 template <
typename _Tp,
typename _Up>
680 static constexpr
bool 681 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
684 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
685 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
689 template<
typename _Tp,
typename _Up,
typename =
void>
690 struct __not_overloaded2 :
true_type { };
693 template<
typename _Tp,
typename _Up>
694 struct __not_overloaded2<_Tp, _Up, __void_t<
695 decltype(
std::
declval<_Tp>().operator>=(std::declval<_Up>()))>>
699 template<
typename _Tp,
typename _Up,
typename =
void>
700 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
703 template<
typename _Tp,
typename _Up>
704 struct __not_overloaded<_Tp, _Up, __void_t<
705 decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>>
708 template<
typename _Tp,
typename _Up>
709 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
718 template <
typename _Tp,
typename _Up>
720 operator()(_Tp&& __t, _Up&& __u)
const 721 noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)))
722 -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))
724 return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u),
725 __ptr_cmp<_Tp, _Up>{});
728 template<
typename _Tp,
typename _Up>
730 operator()(_Tp* __t, _Up* __u)
const noexcept
733 typedef __is_transparent is_transparent;
736 template <
typename _Tp,
typename _Up>
737 static constexpr decltype(
auto)
739 {
return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); }
741 template <
typename _Tp,
typename _Up>
742 static constexpr
bool 743 _S_cmp(_Tp&& __t, _Up&& __u,
true_type) noexcept
746 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
747 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
751 template<
typename _Tp,
typename _Up,
typename =
void>
752 struct __not_overloaded2 :
true_type { };
755 template<
typename _Tp,
typename _Up>
756 struct __not_overloaded2<_Tp, _Up, __void_t<
757 decltype(
std::
declval<_Tp>().operator<=(std::declval<_Up>()))>>
761 template<
typename _Tp,
typename _Up,
typename =
void>
762 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
765 template<
typename _Tp,
typename _Up>
766 struct __not_overloaded<_Tp, _Up, __void_t<
767 decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>>
770 template<
typename _Tp,
typename _Up>
771 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
787 #if __cplusplus > 201103L 788 template<
typename _Tp =
void>
791 template<
typename _Tp =
void>
794 template<
typename _Tp =
void>
799 template<
typename _Tp>
804 operator()(
const _Tp& __x,
const _Tp& __y)
const 805 {
return __x && __y; }
809 template<
typename _Tp>
810 struct logical_or :
public binary_function<_Tp, _Tp, bool>
814 operator()(
const _Tp& __x,
const _Tp& __y)
const 815 {
return __x || __y; }
819 template<
typename _Tp>
820 struct logical_not :
public unary_function<_Tp, bool>
824 operator()(
const _Tp& __x)
const 828 #if __cplusplus > 201103L 833 template <
typename _Tp,
typename _Up>
836 operator()(_Tp&& __t, _Up&& __u)
const 837 noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u)))
838 -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u))
839 {
return std::forward<_Tp>(__t) && std::forward<_Up>(__u); }
841 typedef __is_transparent is_transparent;
848 template <
typename _Tp,
typename _Up>
851 operator()(_Tp&& __t, _Up&& __u)
const 852 noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u)))
853 -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u))
854 {
return std::forward<_Tp>(__t) || std::forward<_Up>(__u); }
856 typedef __is_transparent is_transparent;
863 template <
typename _Tp>
866 operator()(_Tp&& __t)
const 867 noexcept(noexcept(!std::forward<_Tp>(__t)))
868 -> decltype(!std::forward<_Tp>(__t))
869 {
return !std::forward<_Tp>(__t); }
871 typedef __is_transparent is_transparent;
876 #if __cplusplus > 201103L 877 template<
typename _Tp =
void>
880 template<
typename _Tp =
void>
883 template<
typename _Tp =
void>
886 template<
typename _Tp =
void>
892 template<
typename _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 928 #if __cplusplus > 201103L 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,
typename _Up>
963 operator()(_Tp&& __t, _Up&& __u)
const 964 noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)))
965 -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))
966 {
return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); }
968 typedef __is_transparent is_transparent;
974 template <
typename _Tp>
977 operator()(_Tp&& __t)
const 978 noexcept(noexcept(~std::forward<_Tp>(__t)))
979 -> decltype(~std::forward<_Tp>(__t))
980 {
return ~
std::forward<_Tp>(__t); }
982 typedef __is_transparent is_transparent;
1019 template<
typename _Predicate>
1021 :
public unary_function<typename _Predicate::argument_type, bool>
1027 _GLIBCXX14_CONSTEXPR
1031 _GLIBCXX14_CONSTEXPR
1033 operator()(
const typename _Predicate::argument_type& __x)
const 1034 {
return !_M_pred(__x); }
1038 template<
typename _Predicate>
1039 _GLIBCXX14_CONSTEXPR
1045 template<
typename _Predicate>
1048 typename _Predicate::second_argument_type, bool>
1054 _GLIBCXX14_CONSTEXPR
1058 _GLIBCXX14_CONSTEXPR
1060 operator()(
const typename _Predicate::first_argument_type& __x,
1061 const typename _Predicate::second_argument_type& __y)
const 1062 {
return !_M_pred(__x, __y); }
1066 template<
typename _Predicate>
1067 _GLIBCXX14_CONSTEXPR
1098 template<
typename _Arg,
typename _Result>
1102 _Result (*_M_ptr)(_Arg);
1112 operator()(_Arg __x)
const 1113 {
return _M_ptr(__x); }
1117 template<
typename _Arg,
typename _Result>
1123 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1128 _Result (*_M_ptr)(_Arg1, _Arg2);
1138 operator()(_Arg1 __x, _Arg2 __y)
const 1139 {
return _M_ptr(__x, __y); }
1143 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1149 template<
typename _Tp>
1151 :
public unary_function<_Tp, _Tp>
1154 operator()(_Tp& __x)
const 1158 operator()(
const _Tp& __x)
const 1163 template<
typename _Tp>
struct _Identity<const _Tp> : _Identity<_Tp> { };
1165 template<
typename _Pair>
1167 :
public unary_function<_Pair, typename _Pair::first_type>
1169 typename _Pair::first_type&
1170 operator()(_Pair& __x)
const 1171 {
return __x.first; }
1173 const typename _Pair::first_type&
1174 operator()(
const _Pair& __x)
const 1175 {
return __x.first; }
1177 #if __cplusplus >= 201103L 1178 template<
typename _Pair2>
1179 typename _Pair2::first_type&
1180 operator()(_Pair2& __x)
const 1181 {
return __x.first; }
1183 template<
typename _Pair2>
1184 const typename _Pair2::first_type&
1185 operator()(
const _Pair2& __x)
const 1186 {
return __x.first; }
1190 template<
typename _Pair>
1192 :
public unary_function<_Pair, typename _Pair::second_type>
1194 typename _Pair::second_type&
1195 operator()(_Pair& __x)
const 1196 {
return __x.second; }
1198 const typename _Pair::second_type&
1199 operator()(
const _Pair& __x)
const 1200 {
return __x.second; }
1223 template<
typename _Ret,
typename _Tp>
1232 operator()(_Tp* __p)
const 1233 {
return (__p->*_M_f)(); }
1236 _Ret (_Tp::*_M_f)();
1240 template<
typename _Ret,
typename _Tp>
1249 operator()(
const _Tp* __p)
const 1250 {
return (__p->*_M_f)(); }
1253 _Ret (_Tp::*_M_f)()
const;
1257 template<
typename _Ret,
typename _Tp>
1266 operator()(_Tp& __r)
const 1267 {
return (__r.*_M_f)(); }
1270 _Ret (_Tp::*_M_f)();
1274 template<
typename _Ret,
typename _Tp>
1283 operator()(
const _Tp& __r)
const 1284 {
return (__r.*_M_f)(); }
1287 _Ret (_Tp::*_M_f)()
const;
1291 template<
typename _Ret,
typename _Tp,
typename _Arg>
1300 operator()(_Tp* __p, _Arg __x)
const 1301 {
return (__p->*_M_f)(__x); }
1304 _Ret (_Tp::*_M_f)(_Arg);
1308 template<
typename _Ret,
typename _Tp,
typename _Arg>
1317 operator()(
const _Tp* __p, _Arg __x)
const 1318 {
return (__p->*_M_f)(__x); }
1321 _Ret (_Tp::*_M_f)(_Arg)
const;
1325 template<
typename _Ret,
typename _Tp,
typename _Arg>
1334 operator()(_Tp& __r, _Arg __x)
const 1335 {
return (__r.*_M_f)(__x); }
1338 _Ret (_Tp::*_M_f)(_Arg);
1342 template<
typename _Ret,
typename _Tp,
typename _Arg>
1351 operator()(
const _Tp& __r, _Arg __x)
const 1352 {
return (__r.*_M_f)(__x); }
1355 _Ret (_Tp::*_M_f)(_Arg)
const;
1360 template<
typename _Ret,
typename _Tp>
1362 mem_fun(_Ret (_Tp::*__f)())
1365 template<
typename _Ret,
typename _Tp>
1366 inline const_mem_fun_t<_Ret, _Tp>
1367 mem_fun(_Ret (_Tp::*__f)()
const)
1368 {
return const_mem_fun_t<_Ret, _Tp>(__f); }
1370 template<
typename _Ret,
typename _Tp>
1371 inline mem_fun_ref_t<_Ret, _Tp>
1372 mem_fun_ref(_Ret (_Tp::*__f)())
1373 {
return mem_fun_ref_t<_Ret, _Tp>(__f); }
1375 template<
typename _Ret,
typename _Tp>
1376 inline const_mem_fun_ref_t<_Ret, _Tp>
1377 mem_fun_ref(_Ret (_Tp::*__f)()
const)
1378 {
return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
1380 template<
typename _Ret,
typename _Tp,
typename _Arg>
1381 inline mem_fun1_t<_Ret, _Tp, _Arg>
1382 mem_fun(_Ret (_Tp::*__f)(_Arg))
1383 {
return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1385 template<
typename _Ret,
typename _Tp,
typename _Arg>
1386 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
1387 mem_fun(_Ret (_Tp::*__f)(_Arg)
const)
1388 {
return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
1390 template<
typename _Ret,
typename _Tp,
typename _Arg>
1391 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
1392 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
1393 {
return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1395 template<
typename _Ret,
typename _Tp,
typename _Arg>
1396 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
1397 mem_fun_ref(_Ret (_Tp::*__f)(_Arg)
const)
1398 {
return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
1402 #if __cplusplus >= 201402L 1403 template<
typename _Func,
typename _SfinaeType,
typename = __
void_t<>>
1404 struct __has_is_transparent
1407 template<
typename _Func,
typename _SfinaeType>
1408 struct __has_is_transparent<_Func, _SfinaeType,
1409 __void_t<typename _Func::is_transparent>>
1410 {
typedef void type; };
1412 template<
typename _Func,
typename _SfinaeType>
1413 using __has_is_transparent_t
1414 =
typename __has_is_transparent<_Func, _SfinaeType>::type;
1417 _GLIBCXX_END_NAMESPACE_VERSION
1420 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED 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 adaptors for member pointers.
_Result result_type
result_type is the return type
One of the adaptors for function pointers.
One of the Boolean operations functors.
One of the adaptors for member pointers.
_Arg1 first_argument_type
first_argument_type is the type of the first argument
One of the comparison functors.
_Result result_type
result_type is the return type
One of the adaptors for member pointers.
One of the adaptors for member pointers.
auto declval() noexcept -> decltype(__declval< _Tp >(0))
One of the math functors.
One of the negation functors.
One of the comparison functors.
One of the math functors.
One of the math functors.
One of the adaptors for function pointers.
One of the math functors.
constexpr binary_negate< _Predicate > not2(const _Predicate &__pred)
One of the negation functors.
One of the comparison functors.
One of the adaptors for member pointers.
constexpr unary_negate< _Predicate > not1(const _Predicate &__pred)
One of the negation functors.
One of the comparison functors.
One of the comparison functors.
One of the adaptors for member pointers.
constexpr _Tp operator()(const _Tp &__x, const _Tp &__y) const
Returns the sum.
One of the Boolean operations functors.
One of the comparison functors.
One of the adaptors for member pointers.
One of the Boolean operations functors.
One of the adaptors for member pointers.
_Arg2 second_argument_type
second_argument_type is the type of the second argument
ISO C++ entities toplevel namespace is std.
_Arg argument_type
argument_type is the type of the argument
One of the math functors.
One of the negation functors.