id summary reporter owner description type status milestone component version severity resolution keywords cc 7619 Compiler error with move and packaged_task anonymous viboes "Consider the following simple code: {{{ // mt_test.cpp #include #include #include int process_data() { return 1; } int main() { boost::asio::io_service io_service; boost::asio::io_service::work work(io_service); boost::packaged_task task(boost::bind(&process_data)); io_service.post(boost::move(task)); } }}} This generates the errors (using gcc version 4.6.3 and boost 1.51.0) {{{ g++ -I ./boost_1_51_0/ mt_test.cpp -o mt_test In file included from ./boost_1_51_0/boost/asio/io_service.hpp:767:0, from ./boost_1_51_0/boost/asio/basic_io_object.hpp:19, from ./boost_1_51_0/boost/asio/basic_socket.hpp:19, from ./boost_1_51_0/boost/asio/basic_datagram_socket.hpp:20, from ./boost_1_51_0/boost/asio.hpp:20, from mt_test.cpp:2: ./boost_1_51_0/boost/asio/impl/io_service.hpp: In member function ‘void boost::asio::io_service::post(const CompletionHandler&) [with CompletionHandler = boost::detail::thread_move_t >]’: mt_test.cpp:18:34: instantiated from here ./boost_1_51_0/boost/asio/impl/io_service.hpp:95:67: error: no match for call to ‘(boost::detail::thread_move_t >) ()’ In file included from ./boost_1_51_0/boost/asio/detail/handler_invoke_helpers.hpp:21:0, from ./boost_1_51_0/boost/asio/detail/bind_handler.hpp:20, from ./boost_1_51_0/boost/asio/detail/wrapped_handler.hpp:18, from ./boost_1_51_0/boost/asio/io_service.hpp:24, from ./boost_1_51_0/boost/asio/basic_io_object.hpp:19, from ./boost_1_51_0/boost/asio/basic_socket.hpp:19, from ./boost_1_51_0/boost/asio/basic_datagram_socket.hpp:20, from ./boost_1_51_0/boost/asio.hpp:20, from mt_test.cpp:2: ./boost_1_51_0/boost/asio/handler_invoke_hook.hpp: In function ‘void boost::asio::asio_handler_invoke(Function, ...) [with Function = boost::detail::thread_move_t >]’: ./boost_1_51_0/boost/asio/detail/handler_invoke_helpers.hpp:39:3: instantiated from ‘void boost_asio_handler_invoke_helpers::invoke(Function&, Context&) [with Function = boost::detail::thread_move_t >, Context = boost::detail::thread_move_t >]’ ./boost_1_51_0/boost/asio/detail/completion_handler.hpp:67:7: instantiated from ‘static void boost::asio::detail::completion_handler::do_complete(boost::asio::detail::io_service_impl*, boost::asio::detail::operation*, const boost::system::error_code&, std::size_t) [with Handler = boost::detail::thread_move_t >, boost::asio::detail::io_service_impl = boost::asio::detail::task_io_service, boost::asio::detail::operation = boost::asio::detail::task_io_service_operation, std::size_t = long unsigned int]’ ./boost_1_51_0/boost/asio/detail/completion_handler.hpp:38:48: instantiated from ‘boost::asio::detail::completion_handler::completion_handler(Handler&) [with Handler = boost::detail::thread_move_t >]’ ./boost_1_51_0/boost/asio/detail/impl/task_io_service.hpp:61:3: instantiated from ‘void boost::asio::detail::task_io_service::post(Handler) [with Handler = boost::detail::thread_move_t >]’ ./boost_1_51_0/boost/asio/impl/io_service.hpp:97:3: instantiated from ‘void boost::asio::io_service::post(const CompletionHandler&) [with CompletionHandler = boost::detail::thread_move_t >]’ mt_test.cpp:18:34: instantiated from here ./boost_1_51_0/boost/asio/handler_invoke_hook.hpp:64:3: error: no match for call to ‘(boost::detail::thread_move_t >) ()’ }}} I thought this was solved in [https://svn.boost.org/trac/boost/ticket/4521 Ticket 4521]?" Bugs closed To Be Determined thread Boost 1.51.0 Regression invalid move, packaged_task, futures, io_service