
e r wrote:
Steven Watanabe wrote:
AMDG
e r wrote:
// probably not what result_of::transform expects, based on compile // errors (below) template
struct result{ typedef typename Metafun::type type; }; Fusion uses Boost.ResultOf. http://www.boost.org/doc/libs/1_36_0/libs/utility/utility.htm#result_of
In Christ, Steven Watanabe
Thanks. I read the link above before posting as well as the proposal:
//example from proposal. struct square_ { template<typename T> struct result { typedef T type; }
template<typename T> T operator()(T& x) const { return x*x; } };
but I'm not qualified enough to deduce the right answer in my case. i thought id would be like this:
template<typename Arg1> struct fun{ template
struct result{ typedef typename Metafun::type type; }; template
typename Metafun::type operator()(const Metafun& meta,const Arg2& arg2)const{ typedef typename Metafun::type result_type; return result_type(args,arg2); } }; but apparently it's not correct. I guess I can't fully make sense of F::result
::type. any hint here would be really helpful. thanks!
I may have made a little bit of progress here...
struct fun{
template<typename Signature> struct result;
template<typename A>
struct result