
25 Jan
2009
25 Jan
'09
10:45 a.m.
James Porter wrote:
The interface is straightforward, so I'll let the following code snippet speak for itself:
memoizer<int (int,int)> memo(my_func); int ret = memo(i,j);
It would be better if it worked with any function object. Thus the return type cannot be memoizer<int (int, int)>, unless you also perform type erasure, which would be fairly silly.