I've a class with [] operator overloaded. I also have a thread to start... How can I bind [] to the thread?
I tried this:
threadpool.schedule( bind( static_cast< MyClass (MyClass::*)(const MyClass &arg )>( &MyClass::operator[]), arg ) )
but VS2008 says:
error C2664:
'boost::threadpool::thread_pool::schedule': cannot convert parameter 1 from 'boost::_bi::bind_t' to 'const boost::function0 &'
How can i resolve this? Thank you in advance.