4 Dec
2008
4 Dec
'08
3:35 a.m.
On Wed, Dec 3, 2008 at 22:29, Jason Cipriani
Sorry if this is a stupid question, but the only thing I could think of was "(LPVOID)new shared_ptr(p)", but that means each thread must explicitly delete the new shared_ptr and that kind of defeats the purpose!
That's the usual way to pass things through void* callbacks. If you don't want to do that, then use boost.thread, which does that trick for you with boost.function so you can use arbitrary functors, allowing state. boost::thread mythread(boost::bind(threadproc, something));