
26 Jan
2009
26 Jan
'09
12:51 a.m.
James Porter wrote:
I'm still considering the syntax for that. It's simple enough for boost::functions, but for generic function objects, it's not clear to me what the syntax should be, since a function object could potentially have many overloads of operator().
Why not simply auto g = memoize(f); /* type of g is unspecified, using auto for automatic type deduction */ just like bind & friends. Does your memoize adaptor require knowing the signatures of the function object?