
Zachary Turner <divisortheory@gmail.com> writes:
On Fri, Feb 19, 2010 at 3:48 AM, Anthony Williams <anthony.ajw@gmail.com>wrote:
"Hartmut Kaiser" <hartmut.kaiser@gmail.com> writes:
Sorry, but still not good:
boost\thread\win32\thread_heap_alloc.hpp(97): error C2664: 'boost::detail::thread_data<F>::thread_data(F &&)' : cannot convert parameter 1 from 'void (__cdecl *)(void)' to 'void (__cdecl *&&)(void)'
I think that's a knock-on from the core bug. I'll try disabling the rvalue-ref thread constructor for MSVC10. If that doesn't work then rvalue refs in MSVC10 are more broken than I thought.
You can fix *all* of the original errors by applying std::move() in every case. This includes the error you reported the bug about on Microsoft Connect.
That's not entirely true. If you apply std::move (or equivalently static_cast<T&&>, as I have now done on trunk) then the primary bug still hits you if you try and pass the a plain function as the thread function. I've fixed this on trunk by masking the rvalue-reference thread constructor for MSVC10. I think the thread lib is now in much better shape for MSVC10. There were a few failures when I ran the tests, which I'll tend to later, but most passed. Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976