57 #ifndef _BACKWARD_BINDERS_H
58 #define _BACKWARD_BINDERS_H 1
60 namespace std _GLIBCXX_VISIBILITY(default)
62 _GLIBCXX_BEGIN_NAMESPACE_VERSION
99 template<
typename _Operation>
101 :
public unary_function<typename _Operation::second_argument_type,
102 typename _Operation::result_type>
106 typename _Operation::first_argument_type value;
110 const typename _Operation::first_argument_type& __y)
111 : op(__x), value(__y) { }
113 typename _Operation::result_type
114 operator()(
const typename _Operation::second_argument_type& __x)
const
115 {
return op(value, __x); }
119 typename _Operation::result_type
120 operator()(
typename _Operation::second_argument_type& __x)
const
121 {
return op(value, __x); }
122 } _GLIBCXX_DEPRECATED;
125 template<
typename _Operation,
typename _Tp>
127 bind1st(
const _Operation& __fn,
const _Tp& __x)
129 typedef typename _Operation::first_argument_type _Arg1_type;
134 template<
typename _Operation>
137 typename _Operation::result_type>
141 typename _Operation::second_argument_type value;
145 const typename _Operation::second_argument_type& __y)
146 : op(__x), value(__y) { }
148 typename _Operation::result_type
149 operator()(
const typename _Operation::first_argument_type& __x)
const
150 {
return op(__x, value); }
154 typename _Operation::result_type
155 operator()(
typename _Operation::first_argument_type& __x)
const
156 {
return op(__x, value); }
157 } _GLIBCXX_DEPRECATED;
160 template<
typename _Operation,
typename _Tp>
162 bind2nd(
const _Operation& __fn,
const _Tp& __x)
164 typedef typename _Operation::second_argument_type _Arg2_type;
169 _GLIBCXX_END_NAMESPACE_VERSION
binder2nd< _Operation > bind2nd(const _Operation &__fn, const _Tp &__x)
One of the binder functors.
binder1st< _Operation > bind1st(const _Operation &__fn, const _Tp &__x)
One of the binder functors.
One of the binder functors.
One of the binder functors.