私が持っているとしましょう:
class Base
{
public:
void operator()()
{
this->run();
}
virtual void run () {}
}
class Derived : public Base
{
public:
virtual void run ()
{
// Will this be called when the boost::thread runs?
}
}
int main()
{
Base * b = new Derived();
boost::thread t(*b); // <-- which "run()" function will be called - Base or Derived?
t.join();
delete b;
}
私のテストから、私はDerived::run()
呼ばれることができません。私は何か間違ったことをしていますか、それともこれは不可能ですか?