![]() |
Home | Libraries | People | FAQ | More |
Creates a fused_function_object adapter
for a given Deferred
Callable Object. The usual element
conversion is applied to the target function.
template <typename F>
inline typename make_fused_function_object<F>::type
make_fused_function_object(F const & f);
| Parameter | Requirement | Description |
|---|---|---|
f |
Model of Polymorphic Function Object | The function to transform. |
make_fused_function_object(f);
Return type: A specialization of fused_function_object.
Semantics: Returns a fused_function_object adapter
for f.
#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
struct sub { template<typename T, typename _> struct result { typedef T type; }; template<typename T> T operator()(T lhs, T rhs) const { return lhs - rhs; } }; void try_it() {vector<int,float> a(2,2.0f);vector<int,float> b(1,1.5f);vector<int,float> c(1,0.5f); assert(c ==transform(zip(a,b), make_fused_function_object(sub()))); }
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |