4 #ifndef UTILMM_FUNCTIONAL_BINARY_COMPOSE_HEADER 5 # define UTILMM_FUNCTIONAL_BINARY_COMPOSE_HEADER 34 template<
class BinaryFun,
class UnaryFun1,
class UnaryFun2>
36 :
public std::binary_function<typename UnaryFun1::argument_type,
37 typename UnaryFun2::argument_type,
38 typename BinaryFun::result_type> {
66 :bin_fn(bin), fun_1(one), fun_2(two) {}
77 typename BinaryFun::result_type
operator()(first_arg a, second_arg b)
79 return bin_fn(fun_1(a), fun_2(b));
100 template<
class Bin,
class Fun1,
class Fun2>
108 #endif // UTILMM_FUNCTIONAL_BINARY_COMPOSE_HEADER binary_compose_2< Bin, Fun1, Fun2 > compose2_2(Bin const &f, Fun1 const &a, Fun2 const &b)
Composition function.
Definition: binary_compose.hh:101
BinaryFun::result_type operator()(first_arg a, second_arg b) const
Call operator.
Definition: binary_compose.hh:77
Definition: auto_flag.hh:6
Definition of utilmm::arg_traits class.
Binary functor composition with two unary functors.
Definition: binary_compose.hh:35
computed_type type
argument type
Definition: arg_traits.hh:38
binary_compose_2(BinaryFun const &bin, UnaryFun1 const &one, UnaryFun2 const &two)
Constructor.
Definition: binary_compose.hh:64