On Thu, Aug 27, 2009 at 6:04 AM, Bruno Lalande
Yes, in fact after I found no answers in my mailbox this morning I noodled on the problem some more and came up with that solution. The difficulty is that there is a lot of non-variadic cruft common to the general and specialized template classes. I didn't want to repeat all of that.
Another way to solve that could be to isolate the variadic stuff if a class (named "foo" below):
template
class foo { void operator()(S, W); }; template <typename S> class foo
{ void operator()(S); };template
class derived: public foo , public baseclass{ // common non-variadic stuff };If I remember the C++ rules well, the operator() in "foo" would properly override the virtual operator() of "baseclass" in "derived".
You can use a CRTP if "foo" needs anything in "derived" for its implementation...
I actually had a rather identical problem as the first post, but I solved it rather easily using Boost.Fusion building up a helper struct to act as the operator().