57 #ifndef _BACKWARD_BINDERS_H
58 #define _BACKWARD_BINDERS_H 1
60 namespace std _GLIBCXX_VISIBILITY(default)
62 _GLIBCXX_BEGIN_NAMESPACE_VERSION
104 template<
typename _Operation>
106 :
public unary_function<typename _Operation::second_argument_type,
107 typename _Operation::result_type>
111 typename _Operation::first_argument_type value;
115 const typename _Operation::first_argument_type& __y)
116 : op(__x), value(__y) { }
118 typename _Operation::result_type
119 operator()(
const typename _Operation::second_argument_type& __x)
const
120 {
return op(value, __x); }
124 typename _Operation::result_type
125 operator()(
typename _Operation::second_argument_type& __x)
const
126 {
return op(value, __x); }
127 } _GLIBCXX_DEPRECATED;
130 template<
typename _Operation,
typename _Tp>
132 bind1st(
const _Operation& __fn,
const _Tp& __x)
134 typedef typename _Operation::first_argument_type _Arg1_type;
139 template<
typename _Operation>
142 typename _Operation::result_type>
146 typename _Operation::second_argument_type value;
150 const typename _Operation::second_argument_type& __y)
151 : op(__x), value(__y) { }
153 typename _Operation::result_type
154 operator()(
const typename _Operation::first_argument_type& __x)
const
155 {
return op(__x, value); }
159 typename _Operation::result_type
160 operator()(
typename _Operation::first_argument_type& __x)
const
161 {
return op(__x, value); }
162 } _GLIBCXX_DEPRECATED;
165 template<
typename _Operation,
typename _Tp>
167 bind2nd(
const _Operation& __fn,
const _Tp& __x)
169 typedef typename _Operation::second_argument_type _Arg2_type;
174 _GLIBCXX_END_NAMESPACE_VERSION
binder1st< _Operation > bind1st(const _Operation &__fn, const _Tp &__x)
One of the binder functors.
binder2nd< _Operation > bind2nd(const _Operation &__fn, const _Tp &__x)
One of the binder functors.
One of the binder functors.
One of the binder functors.