mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-11 13:33:56 +00:00
Removed the use of std::unary_function.
This commit is contained in:
parent
28b8cc8c9c
commit
30b93d7428
@ -16,9 +16,10 @@
|
|||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
template <class Operation>
|
template <class Operation>
|
||||||
class binder1st
|
class binder1st {
|
||||||
: public std::unary_function<typename Operation::second_argument_type,
|
public:
|
||||||
typename Operation::result_type> {
|
typedef typename Operation::result_type result_type;
|
||||||
|
typedef typename Operation::second_argument_type argument_type;
|
||||||
protected:
|
protected:
|
||||||
Operation op;
|
Operation op;
|
||||||
typename Operation::first_argument_type value;
|
typename Operation::first_argument_type value;
|
||||||
@ -29,7 +30,7 @@ namespace boost {
|
|||||||
: op(x), value(y) {}
|
: op(x), value(y) {}
|
||||||
typename Operation::result_type
|
typename Operation::result_type
|
||||||
operator()(const typename Operation::second_argument_type& x) const {
|
operator()(const typename Operation::second_argument_type& x) const {
|
||||||
return op(value, x);
|
return op(value, x);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,5 +73,3 @@ main(int, char*[])
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user