26 #ifndef MLN_CORE_CONCEPT_META_FUNCTION_HH
27 # define MLN_CORE_CONCEPT_META_FUNCTION_HH
33 # include <mln/core/concept/object.hh>
34 # include <mln/core/concept/function.hh>
36 # define mln_fun_with(F, T) \
37 typename F::template with< T >::ret
39 # define mln_fun_with_(F, T) \
42 # define mln_fun_withbin(F, T1, T2) \
43 typename F::template with< T1, T2 >::ret
45 # define mln_fun_withbin_(F, T1, T2) \
46 F::with< T1, T2 >::ret
48 # define mln_fun_result(F, T) \
49 typename F::template with< T >::ret::result
51 # define mln_fun_result_(F, T) \
52 F::with< T >::ret::result
58 template <
typename E>
struct Meta_Function;
59 template <
typename E>
struct Meta_Function_v2v;
60 template <
typename E>
struct Meta_Function_vv2v;
64 struct Meta_Function<void>
66 typedef Object<void> super;
119 template <
typename E>
135 template <
typename M,
typename T>
139 template <typename M, typename T>
147 # ifndef MLN_INCLUDE_ONLY
149 template <
typename E>
156 template <
typename E>
158 Meta_Function_v2v<E>::Meta_Function_v2v()
162 template <
typename E>
164 Meta_Function_v2v<E>::Meta_Function_v2v(
const Meta_Function_v2v<E>& rhs)
165 : Meta_Function<E>(rhs)
169 template <
typename E>
171 Meta_Function_vv2v<E>::Meta_Function_vv2v()
175 template <
typename E>
177 Meta_Function_vv2v<E>::Meta_Function_vv2v(
const Meta_Function_vv2v<E>& rhs)
178 : Meta_Function<E>(rhs)
185 template <
typename M,
typename T>
190 mlc_is_a(M, Meta_Function)::check();
191 mln_fun_with(M, T) a;
197 # endif // ! MLN_INCLUDE_ONLY
202 #endif // ! MLN_CORE_CONCEPT_META_FUNCTION_HH