template <class A_>
class A
{
public:
A( void (*d)(void*) )
{
}
};
template<class B_>
class B
{
public:
B();
struct Foo
{
B_ bar;
};
static void handleFoo(void *p)
{
}
private:
A<Foo> p;
};
template<class B_>
B<B_>::B()
: p(handleFoo)
{
}
int main(int argc, char **argv)
{
B<int> test;
return 0;
} |