mirror of
https://github.com/boostorg/thread.git
synced 2026-01-23 18:12:12 +00:00
Thread: refix 6174
[SVN r79980]
This commit is contained in:
@@ -484,7 +484,7 @@ namespace boost
|
||||
void mark_finished_with_result(rvalue_source_type result_)
|
||||
{
|
||||
boost::lock_guard<boost::mutex> lock(mutex);
|
||||
mark_finished_with_result_internal(result_);
|
||||
mark_finished_with_result_internal(static_cast<rvalue_source_type>(result_));
|
||||
}
|
||||
|
||||
move_dest_type get()
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// Copyright (C) 2010 Vicente Botet
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
@@ -16,13 +21,21 @@ private:
|
||||
public:
|
||||
MovableButNonCopyable() {};
|
||||
MovableButNonCopyable(MovableButNonCopyable&&) {};
|
||||
MovableButNonCopyable& operator=(MovableButNonCopyable&&) {
|
||||
MovableButNonCopyable& operator=(MovableButNonCopyable&&)
|
||||
{
|
||||
return *this;
|
||||
};
|
||||
};
|
||||
|
||||
MovableButNonCopyable construct()
|
||||
{
|
||||
return MovableButNonCopyable();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::packaged_task<MovableButNonCopyable>(MovableButNonCopyable());
|
||||
boost::packaged_task<MovableButNonCopyable> pt(construct);
|
||||
pt();
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user