Subject: Re: [boost] Interest check: memoization
From: James Porter (porterj_at_[hidden])
Date: 2009-01-25 16:35:32
Mathias Gaunard wrote:
> 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.
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().
Perhaps syntax like memoizer<int (FunctionObj::*)(int, int)> would work?