
27 May
2008
27 May
'08
10:17 p.m.
Anthony Williams wrote:
Sohail Somani <sohail@taggedtype.net> writes:
David Abrahams wrote: [snip]
thread_q[i] = boost::thread( some_function );
[snip]
Why doesn't it require std::move or boost::move? [snip]
You only need std::move or boost::move to move an lvalue. If you've got an rvalue (such as the temporary in Dave's example), move-assignment "just works" in most cases.
In boost 1.35.0 this is done with a move-emulation trick involving conversions to boost::detail::thread_move_t<>, but on trunk it uses rvalue references if the compiler supports it.
Ok, that makes sense. I skipped class that day ;-) -- Sohail Somani http://uint32t.blogspot.com