2013/2/8 Jeffrey Lee Hellrung, Jr.
This looks like an error in the future_traits<T>::init overload set...it's missing an overload that a T const & can bind to (in the second argument).
Also, I think it would be an improvement if set_value_at_thread_exit was able to catch rvalues as emulated rvalue references (when true rvalue references are unavailable) rather than as lvalue-reference-to-const.
Yes indeed, there is an overload resolution ambiguity. I guess movable / emulation stuff in Thread is more difficult to manage since it maintains 2 move emulations (original one from Thread and Move). Move already provides BOOST_RV_REF(T) macro which is T&& on compiler that support it and rv<T>& when emulating and this imho is the argument type future_traits<T>::init() should use to disambiguate. Is the original move emulation even still needed in Thread code. It seems like half on BOOST_THREAD macros try to deal with move semantics. Regards, Simon