
On Thu, Oct 8, 2009 at 4:43 PM, Eric Niebler
I'm not exactly sure what _placeholder is here, or what you mean by "using an object as a placeholder".
Thanks. I just meant that I was using the placeholder template to pass in an external object. But you seem to have gotten the gist of what I was trying to say anyway :-).
I'm afraid not. But if you go the route of creating function object wrappers, then you can get a nice syntax at the call site:
Yeah, I think I've settled on something like that. And I'm going to
resort to a C-style pre-processor define to cut down on the
boilerplate code. Something like (untested):
#define makeFunc( METHOD, PARAM ) \
struct METHOD##func \
{ \
typedef void result_type; \
void operator()(Link *l, PARAM p) const \
{ \
l->METHOD(p); \
} \
} \
function