El 25/11/2011 2:31, Kelvin Chung escribió:
I'm having this compiler issue while trying to use boost::packaged_task (gcc, C++03, move emulation). When I try to compile, I get the following:
src/KMBuilder.cpp:54: error: call of overloaded ‘move(boost::unique_future<long unsigned int>&)’ is ambiguous boost/include/boost/thread/detail/move.hpp:44: note: candidates are: typename boost::enable_if<boost::is_convertible<T&, boost::detail::thread_move_t<T> >, boost::detail::thread_move_t<T>
::type boost::move(T&) [with T = boost::unique_future<long unsigned int>] boost/include/boost/move/move.hpp:294: note: typename boost::move_detail::disable_if<boost::has_move_emulation_enabled<T>, T&>::type boost::move(T&) [with T = boost::unique_future<long unsigned int>]
The offending line of code: futures.push_back(boost::move(taskResult)); // futures is a boost::container::deque
I think the problem is that Boost.Thread used top-level boost:: namespace for its move emulation. I think the only solution is to update Boost.Thread to use Boost.Move. Ion