2
0
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:
Vicente J. Botet Escriba
2012-08-12 16:36:40 +00:00
parent daec1268f9
commit 1ac7e7129d
2 changed files with 16 additions and 3 deletions

View File

@@ -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()

View File

@@ -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