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
116 template<
typename _Arg,
typename _Result>
124 } _GLIBCXX11_DEPRECATED;
130 template<
typename _Arg1,
typename _Arg2,
typename _Result>
141 } _GLIBCXX11_DEPRECATED;
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#pragma GCC diagnostic push
180#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
183 template<
typename _Tp>
190 {
return __x + __y; }
194 template<
typename _Tp>
199 operator()(
const _Tp& __x,
const _Tp& __y)
const
200 {
return __x - __y; }
204 template<
typename _Tp>
209 operator()(
const _Tp& __x,
const _Tp& __y)
const
210 {
return __x * __y; }
214 template<
typename _Tp>
219 operator()(
const _Tp& __x,
const _Tp& __y)
const
220 {
return __x / __y; }
224 template<
typename _Tp>
229 operator()(
const _Tp& __x,
const _Tp& __y)
const
230 {
return __x % __y; }
234 template<
typename _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>
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;
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;
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;
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;
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;
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;
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>
364 template<
typename _Tp =
void>
368#pragma GCC diagnostic push
369#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
372 template<
typename _Tp>
377 operator()(
const _Tp& __x,
const _Tp& __y)
const
378 {
return __x == __y; }
382 template<
typename _Tp>
387 operator()(
const _Tp& __x,
const _Tp& __y)
const
388 {
return __x != __y; }
392 template<
typename _Tp>
397 operator()(
const _Tp& __x,
const _Tp& __y)
const
398 {
return __x > __y; }
402 template<
typename _Tp>
407 operator()(
const _Tp& __x,
const _Tp& __y)
const
408 {
return __x < __y; }
412 template<
typename _Tp>
417 operator()(
const _Tp& __x,
const _Tp& __y)
const
418 {
return __x >= __y; }
422 template<
typename _Tp>
427 operator()(
const _Tp& __x,
const _Tp& __y)
const
428 {
return __x <= __y; }
432 template<
typename _Tp>
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;
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;
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;
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
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;
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;
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
540 typedef __is_transparent is_transparent;
543 template <
typename _Tp,
typename _Up>
544 static constexpr decltype(
auto)
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
553 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
554 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
558 template<
typename _Tp,
typename _Up,
typename =
void>
559 struct __not_overloaded2 :
true_type { };
562 template<
typename _Tp,
typename _Up>
563 struct __not_overloaded2<_Tp, _Up, __void_t<
564 decltype(
std::
declval<_Tp>().operator>(std::declval<_Up>()))>>
568 template<
typename _Tp,
typename _Up,
typename =
void>
569 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
572 template<
typename _Tp,
typename _Up>
573 struct __not_overloaded<_Tp, _Up, __void_t<
577 template<
typename _Tp,
typename _Up>
578 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
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
602 typedef __is_transparent is_transparent;
605 template <
typename _Tp,
typename _Up>
606 static constexpr decltype(
auto)
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
615 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
616 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
620 template<
typename _Tp,
typename _Up,
typename =
void>
621 struct __not_overloaded2 :
true_type { };
624 template<
typename _Tp,
typename _Up>
625 struct __not_overloaded2<_Tp, _Up, __void_t<
626 decltype(
std::
declval<_Tp>().operator<(std::declval<_Up>()))>>
630 template<
typename _Tp,
typename _Up,
typename =
void>
631 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
634 template<
typename _Tp,
typename _Up>
635 struct __not_overloaded<_Tp, _Up, __void_t<
639 template<
typename _Tp,
typename _Up>
640 using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>,
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
664 typedef __is_transparent is_transparent;
667 template <
typename _Tp,
typename _Up>
668 static constexpr decltype(
auto)
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
677 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
678 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
682 template<
typename _Tp,
typename _Up,
typename =
void>
683 struct __not_overloaded2 :
true_type { };
686 template<
typename _Tp,
typename _Up>
687 struct __not_overloaded2<_Tp, _Up, __void_t<
688 decltype(
std::
declval<_Tp>().operator>=(std::declval<_Up>()))>>
692 template<
typename _Tp,
typename _Up,
typename =
void>
693 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
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>,
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
726 typedef __is_transparent is_transparent;
729 template <
typename _Tp,
typename _Up>
730 static constexpr decltype(
auto)
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
739 static_cast<const volatile void*
>(std::forward<_Tp>(__t)),
740 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
744 template<
typename _Tp,
typename _Up,
typename =
void>
745 struct __not_overloaded2 :
true_type { };
748 template<
typename _Tp,
typename _Up>
749 struct __not_overloaded2<_Tp, _Up, __void_t<
750 decltype(
std::
declval<_Tp>().operator<=(std::declval<_Up>()))>>
754 template<
typename _Tp,
typename _Up,
typename =
void>
755 struct __not_overloaded : __not_overloaded2<_Tp, _Up> { };
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>,
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"
795 template<
typename _Tp>
800 operator()(
const _Tp& __x,
const _Tp& __y)
const
801 {
return __x && __y; }
805 template<
typename _Tp>
810 operator()(
const _Tp& __x,
const _Tp& __y)
const
811 {
return __x || __y; }
815 template<
typename _Tp>
820 operator()(
const _Tp& __x)
const
823#pragma GCC diagnostic pop
825#if __cplusplus > 201103L
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;
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;
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"
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
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"
1023 template<
typename _Predicate>
1025 :
public unary_function<typename _Predicate::argument_type, bool>
1031 _GLIBCXX14_CONSTEXPR
1035 _GLIBCXX14_CONSTEXPR
1037 operator()(
const typename _Predicate::argument_type& __x)
const
1038 {
return !_M_pred(__x); }
1042 template<
typename _Predicate>
1043 _GLIBCXX17_DEPRECATED_SUGGEST(
"std::not_fn")
1044 _GLIBCXX14_CONSTEXPR
1050 template<
typename _Predicate>
1053 typename _Predicate::second_argument_type, bool>
1059 _GLIBCXX14_CONSTEXPR
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); }
1071 template<
typename _Predicate>
1072 _GLIBCXX17_DEPRECATED_SUGGEST(
"std::not_fn")
1073 _GLIBCXX14_CONSTEXPR
1104 template<
typename _Arg,
typename _Result>
1108 _Result (*_M_ptr)(_Arg);
1118 operator()(_Arg __x)
const
1119 {
return _M_ptr(__x); }
1120 } _GLIBCXX11_DEPRECATED;
1123 template<
typename _Arg,
typename _Result>
1124 _GLIBCXX11_DEPRECATED_SUGGEST(
"std::function")
1130 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1135 _Result (*_M_ptr)(_Arg1, _Arg2);
1145 operator()(_Arg1 __x, _Arg2 __y)
const
1146 {
return _M_ptr(__x, __y); }
1147 } _GLIBCXX11_DEPRECATED;
1150 template<
typename _Arg1,
typename _Arg2,
typename _Result>
1151 _GLIBCXX11_DEPRECATED_SUGGEST(
"std::function")
1157 template<
typename _Tp>
1159 :
public unary_function<_Tp, _Tp>
1162 operator()(_Tp& __x)
const
1166 operator()(
const _Tp& __x)
const
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; }
1231 template<
typename _Ret,
typename _Tp>
1240 operator()(_Tp* __p)
const
1241 {
return (__p->*_M_f)(); }
1244 _Ret (_Tp::*_M_f)();
1245 } _GLIBCXX11_DEPRECATED;
1248 template<
typename _Ret,
typename _Tp>
1257 operator()(
const _Tp* __p)
const
1258 {
return (__p->*_M_f)(); }
1261 _Ret (_Tp::*_M_f)()
const;
1262 } _GLIBCXX11_DEPRECATED;
1265 template<
typename _Ret,
typename _Tp>
1274 operator()(_Tp& __r)
const
1275 {
return (__r.*_M_f)(); }
1278 _Ret (_Tp::*_M_f)();
1279 } _GLIBCXX11_DEPRECATED;
1282 template<
typename _Ret,
typename _Tp>
1291 operator()(
const _Tp& __r)
const
1292 {
return (__r.*_M_f)(); }
1295 _Ret (_Tp::*_M_f)()
const;
1296 } _GLIBCXX11_DEPRECATED;
1299 template<
typename _Ret,
typename _Tp,
typename _Arg>
1308 operator()(_Tp* __p, _Arg __x)
const
1309 {
return (__p->*_M_f)(__x); }
1312 _Ret (_Tp::*_M_f)(_Arg);
1313 } _GLIBCXX11_DEPRECATED;
1316 template<
typename _Ret,
typename _Tp,
typename _Arg>
1325 operator()(
const _Tp* __p, _Arg __x)
const
1326 {
return (__p->*_M_f)(__x); }
1329 _Ret (_Tp::*_M_f)(_Arg)
const;
1330 } _GLIBCXX11_DEPRECATED;
1333 template<
typename _Ret,
typename _Tp,
typename _Arg>
1342 operator()(_Tp& __r, _Arg __x)
const
1343 {
return (__r.*_M_f)(__x); }
1346 _Ret (_Tp::*_M_f)(_Arg);
1347 } _GLIBCXX11_DEPRECATED;
1350 template<
typename _Ret,
typename _Tp,
typename _Arg>
1359 operator()(
const _Tp& __r, _Arg __x)
const
1360 {
return (__r.*_M_f)(__x); }
1363 _Ret (_Tp::*_M_f)(_Arg)
const;
1364 } _GLIBCXX11_DEPRECATED;
1368 template<
typename _Ret,
typename _Tp>
1369 _GLIBCXX11_DEPRECATED_SUGGEST(
"std::mem_fn")
1371 mem_fun(_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
auto declval() noexcept -> decltype(__declval< _Tp >(0))
constexpr binary_negate< _Predicate > not2(const _Predicate &__pred)
One of the negation functors.
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.
constexpr _Tp operator()(const _Tp &__x, const _Tp &__y) const
Returns the sum.
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.