56 #ifndef _BACKWARD_BINDERS_H
57 #define _BACKWARD_BINDERS_H 1
60 #pragma GCC diagnostic push
61 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63 namespace std _GLIBCXX_VISIBILITY(default)
65 _GLIBCXX_BEGIN_NAMESPACE_VERSION
107 template<
typename _Operation>
109 :
public unary_function<typename _Operation::second_argument_type,
110 typename _Operation::result_type>
114 typename _Operation::first_argument_type value;
118 const typename _Operation::first_argument_type& __y)
119 : op(__x), value(__y) { }
121 typename _Operation::result_type
122 operator()(
const typename _Operation::second_argument_type& __x)
const
123 {
return op(value, __x); }
127 typename _Operation::result_type
128 operator()(
typename _Operation::second_argument_type& __x)
const
129 {
return op(value, __x); }
130 } _GLIBCXX_DEPRECATED;
133 template<
typename _Operation,
typename _Tp>
135 bind1st(
const _Operation& __fn,
const _Tp& __x)
137 typedef typename _Operation::first_argument_type _Arg1_type;
142 template<
typename _Operation>
145 typename _Operation::result_type>
149 typename _Operation::second_argument_type value;
153 const typename _Operation::second_argument_type& __y)
154 : op(__x), value(__y) { }
156 typename _Operation::result_type
157 operator()(
const typename _Operation::first_argument_type& __x)
const
158 {
return op(__x, value); }
162 typename _Operation::result_type
163 operator()(
typename _Operation::first_argument_type& __x)
const
164 {
return op(__x, value); }
165 } _GLIBCXX_DEPRECATED;
168 template<
typename _Operation,
typename _Tp>
170 bind2nd(
const _Operation& __fn,
const _Tp& __x)
172 typedef typename _Operation::second_argument_type _Arg2_type;
177 _GLIBCXX_END_NAMESPACE_VERSION
180 #pragma GCC diagnostic pop
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.
ISO C++ entities toplevel namespace is std.
One of the binder functors.
One of the binder functors.