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 ;)
Maybe you have the patience to look at this minimalistic
framework (I stripped almost all functionality):
http://pastebin.com/m7dcc833f
This compiles well and running it gives me the expected:
# starting
# This is A
# This is B
# shutting down
The problem is, that I want to run the kernels as threads.
Have (again) a look at the highlighted lines (27-29):
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