dizzy wrote:
I dont understand what you want to achieve so I can't recommend something based on that but strictly speaking about the issue, fooFO receives a template template parameter and not a type so you cannot give it an instantiation of MHBase, you probably want to give it MHBase. So:
FooFunc ff = fooFO<MHBase>(*this);
(even tho I don't understand why in that case fooFO is made to receive a template template parameter being defined inside MHBase, you do not need the flexibility of being able to give it something else than MHBase do you?)
Hi Dizzy,
What I'm trying to do is generically package up a function object to
the MHBase's member foo(). I can certainly do this directly
for every derived class's member foo_() but I thought I would try to
see if it could be done once in the MHBase. How do people
accomplish this?
Looking at it again with your comment in mind, the fooFO doesn't need to
be a template (I think) so can be even more simplified, but then I
get "void value not ignored as it ought to be" at the line:
"FooFunc ff = put.getFooFunc();"
I get the same thing if I try: FooFunc ff = MHBase<Put>::fooFO(put);
Here's the code:
#include