id summary reporter owner description type status milestone component version severity resolution keywords cc 6174 packaged_task doesn't correctly handle moving results onlyone@… viboes "I want to create a packaged task which wraps a function which returns an object which is movable but non-copyable. I tried: {{{ #include struct MovableButNonCopyable { MovableButNonCopyable() = default; MovableButNonCopyable(MovableButNonCopyable const&) = delete; MovableButNonCopyable& operator=(MovableButNonCopyable const&) = delete; MovableButNonCopyable(MovableButNonCopyable&&) = default; MovableButNonCopyable& operator=(MovableButNonCopyable&&) = default; }; int main() { boost::packaged_task([]{return MovableButNonCopyable();}); } }}} This does not compile, because the instantiation of `packaged_task` results in the generation of a function that attempts to call the deleted copy constructor for `MovableButNonCopyable`. I have determined that this is due to a bug at `future.hpp:325`, where an rvalue-to-lvalue decay is allowed to occur, which results in the incorrect function overload being used. A patch is attached which adds the required cast. " Patches closed Boost 1.51.0 thread Boost Development Trunk Showstopper fixed move packaged_task Anthony Williams viboes