Suppose we have the general function pointer:
template <class ArgT, class RetT, class F>
struct A {
F f;
public:
A(F f) : f(f) {}
RetT operator()(ArgT arg) { return f(arg); }
};
Why does this work?
template <class ArgT, class RetT, class F>
class B {
A<ArgT, RetT, F> test;
};
... and this not ?
class C {
template <class ArgT, class RetT, class F>
A<ArgT, RetT, F> test;
};
error C3857: 'C::test': multiple template parameter lists are not allowed
I need to define a class like in last example (class C), how can I do that?
sizeof(C)would be infinite ^_^