The title of the question is plain and simple. here is the code:
class xxx : public Scheduled
{
long int _wait_time;
boost::function< void() > _cb;
mutable boost::mutex _mutex;
public:
xxx(boost::function< void() > callback, unsigned int wait_time = 10000000)
:_wait_time(wait_time),_cb(callback)
,Scheduled(Timer(_wait_time, 0))
{
this->stop();
}
};
and although I respect the order of initialization, here is the warning I get:
---: In constructor ‘xxx::xxx(boost::function<void ()()>, unsigned int)’:
---: warning: ‘xxx::_cb’ will be initialized after
---: warning: base ‘Scheduled’
---: warning: when initialized here
Any thoughts? thank you