26 #ifndef MLN_FUN_BINARY_HH
27 # define MLN_FUN_BINARY_HH
29 # include <mln/core/concept/meta_function.hh>
30 # include <mln/fun/spe/binary.hh>
31 # include <mln/trait/next/solve.hh>
32 # include <mln/trait/functions.hh>
40 template <
typename F,
typename E = F>
44 typedef mln_trait_fun_storage(flag) storage;
46 template <typename T1, typename T2>
49 typedef spe::binary<F, T1, T2> ret;
52 template <
typename T1,
typename T2>
53 typename with<T1, T2>::ret::result operator()(
const T1& a,
const T2& b)
const
55 return typename with<T1, T2>::ret(state())(a, b);
59 void init(
const U& value)
61 state_ = mln::trait::function::internal::introspect::has_storage_t<flag, void>::compute(value);
69 binary(
const U& param)
74 stored<storage>& state()
79 const stored<storage>& state()
const
85 stored<storage> state_;
92 #endif // ! MLN_FUN_BINARY_HH