Lines Matching refs:_Tp

49 template <class _Tp>
50 struct plus : public binary_function<_Tp,_Tp,_Tp> {
51 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
54 template <class _Tp>
55 struct minus : public binary_function<_Tp,_Tp,_Tp> {
56 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
59 template <class _Tp>
60 struct multiplies : public binary_function<_Tp,_Tp,_Tp> {
61 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
64 template <class _Tp>
65 struct divides : public binary_function<_Tp,_Tp,_Tp> {
66 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
71 template <class _Tp> inline _Tp identity_element(plus<_Tp>) {
72 return _Tp(0);
74 template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) {
75 return _Tp(1);
78 template <class _Tp>
79 struct modulus : public binary_function<_Tp,_Tp,_Tp>
81 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
84 template <class _Tp>
85 struct negate : public unary_function<_Tp,_Tp>
87 _Tp operator()(const _Tp& __x) const { return -__x; }
90 template <class _Tp>
91 struct equal_to : public binary_function<_Tp,_Tp,bool>
93 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
96 template <class _Tp>
97 struct not_equal_to : public binary_function<_Tp,_Tp,bool>
99 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
102 template <class _Tp>
103 struct greater : public binary_function<_Tp,_Tp,bool>
105 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
108 template <class _Tp>
109 struct less : public binary_function<_Tp,_Tp,bool>
111 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
114 template <class _Tp>
115 struct greater_equal : public binary_function<_Tp,_Tp,bool>
117 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
120 template <class _Tp>
121 struct less_equal : public binary_function<_Tp,_Tp,bool>
123 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
126 template <class _Tp>
127 struct logical_and : public binary_function<_Tp,_Tp,bool>
129 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
132 template <class _Tp>
133 struct logical_or : public binary_function<_Tp,_Tp,bool>
135 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
138 template <class _Tp>
139 struct logical_not : public unary_function<_Tp,bool>
141 bool operator()(const _Tp& __x) const { return !__x; }
203 template <class _Operation, class _Tp>
205 bind1st(const _Operation& __oper, const _Tp& __x)
228 template <class _Operation, class _Tp>
230 bind2nd(const _Operation& __oper, const _Tp& __x)
326 template <class _Tp>
327 struct _Identity : public unary_function<_Tp,_Tp> {
328 const _Tp& operator()(const _Tp& __x) const { return __x; }
331 template <class _Tp> struct identity : public _Identity<_Tp> {};
486 template <class _Ret, class _Tp>
487 class mem_fun_t : public unary_function<_Tp*,_Ret> {
489 explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
490 _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
492 _Ret (_Tp::*_M_f)();
495 template <class _Ret, class _Tp>
496 class const_mem_fun_t : public unary_function<const _Tp*,_Ret> {
498 explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
499 _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
501 _Ret (_Tp::*_M_f)() const;
505 template <class _Ret, class _Tp>
506 class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
508 explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
509 _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
511 _Ret (_Tp::*_M_f)();
514 template <class _Ret, class _Tp>
515 class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
517 explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
518 _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
520 _Ret (_Tp::*_M_f)() const;
523 template <class _Ret, class _Tp, class _Arg>
524 class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
526 explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
527 _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
529 _Ret (_Tp::*_M_f)(_Arg);
532 template <class _Ret, class _Tp, class _Arg>
533 class const_mem_fun1_t : public binary_function<const _Tp*,_Arg,_Ret> {
535 explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
536 _Ret operator()(const _Tp* __p, _Arg __x) const
539 _Ret (_Tp::*_M_f)(_Arg) const;
542 template <class _Ret, class _Tp, class _Arg>
543 class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
545 explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
546 _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
548 _Ret (_Tp::*_M_f)(_Arg);
551 template <class _Ret, class _Tp, class _Arg>
552 class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
554 explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
555 _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
557 _Ret (_Tp::*_M_f)(_Arg) const;
562 template <class _Tp>
563 class mem_fun_t<void, _Tp> : public unary_function<_Tp*,void> {
565 explicit mem_fun_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
566 void operator()(_Tp* __p) const { (__p->*_M_f)(); }
568 void (_Tp::*_M_f)();
571 template <class _Tp>
572 class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*,void> {
574 explicit const_mem_fun_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
575 void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
577 void (_Tp::*_M_f)() const;
580 template <class _Tp>
581 class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
583 explicit mem_fun_ref_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
584 void operator()(_Tp& __r) const { (__r.*_M_f)(); }
586 void (_Tp::*_M_f)();
589 template <class _Tp>
590 class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
592 explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
593 void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
595 void (_Tp::*_M_f)() const;
598 template <class _Tp, class _Arg>
599 class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*,_Arg,void> {
601 explicit mem_fun1_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
602 void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
604 void (_Tp::*_M_f)(_Arg);
607 template <class _Tp, class _Arg>
608 class const_mem_fun1_t<void, _Tp, _Arg>
609 : public binary_function<const _Tp*,_Arg,void> {
611 explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
612 void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
614 void (_Tp::*_M_f)(_Arg) const;
617 template <class _Tp, class _Arg>
618 class mem_fun1_ref_t<void, _Tp, _Arg>
619 : public binary_function<_Tp,_Arg,void> {
621 explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
622 void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
624 void (_Tp::*_M_f)(_Arg);
627 template <class _Tp, class _Arg>
628 class const_mem_fun1_ref_t<void, _Tp, _Arg>
629 : public binary_function<_Tp,_Arg,void> {
631 explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
632 void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
634 void (_Tp::*_M_f)(_Arg) const;
644 template <class _Ret, class _Tp>
645 inline mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)())
646 { return mem_fun_t<_Ret,_Tp>(__f); }
648 template <class _Ret, class _Tp>
649 inline const_mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)() const)
650 { return const_mem_fun_t<_Ret,_Tp>(__f); }
652 template <class _Ret, class _Tp>
653 inline mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)())
654 { return mem_fun_ref_t<_Ret,_Tp>(__f); }
656 template <class _Ret, class _Tp>
657 inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const)
658 { return const_mem_fun_ref_t<_Ret,_Tp>(__f); }
660 template <class _Ret, class _Tp, class _Arg>
661 inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg))
662 { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
664 template <class _Ret, class _Tp, class _Arg>
665 inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const)
666 { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
668 template <class _Ret, class _Tp, class _Arg>
669 inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
670 { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
672 template <class _Ret, class _Tp, class _Arg>
673 inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
674 mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
675 { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
677 template <class _Ret, class _Tp, class _Arg>
678 inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg))
679 { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
681 template <class _Ret, class _Tp, class _Arg>
682 inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg) const)
683 { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
685 template <class _Ret, class _Tp, class _Arg>
686 inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun1_ref(_Ret (_Tp::*__f)(_Arg))
687 { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
689 template <class _Ret, class _Tp, class _Arg>
690 inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
691 mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
692 { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }