
Richard Vock wrote:
I don't really know wether this is a Boost.Thread related question or a general c++ related, but since I couldn't decide I will disturb you first ;)
If I replace 27 by 28+29 I (expectedly) get a compile error since Kernel is abstract. However if I make it non-abstract by implementing the operator() in it, it is this function (namely Kernel::operator()) which get's called instead of TestKernel::operator().
Note that Program will not be able to know about the concrete child classes of Kernel so it cannot dynamic_cast
the pointers and I don't want to use maschine-specific ways like __decltype.
There are lots of ways to skin this cat. The smallest change to your code I think would be this though. --- thread t( boost::bind( &Kernel::operator(), m_kernel[i] ) ); t.join(); --- Regards, Nigel