Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80040 - in branches/release: boost/thread libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2012-08-15 05:54:22


Author: viboes
Date: 2012-08-15 05:54:21 EDT (Wed, 15 Aug 2012)
New Revision: 80040
URL: http://svn.boost.org/trac/boost/changeset/80040

Log:
Thread: merge fix for #6174
Text files modified:
   branches/release/boost/thread/future.hpp | 2 +-
   branches/release/libs/thread/test/test_6174.cpp | 17 +++++++++++++++--
   2 files changed, 16 insertions(+), 3 deletions(-)

Modified: branches/release/boost/thread/future.hpp
==============================================================================
--- branches/release/boost/thread/future.hpp (original)
+++ branches/release/boost/thread/future.hpp 2012-08-15 05:54:21 EDT (Wed, 15 Aug 2012)
@@ -484,7 +484,7 @@
             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()

Modified: branches/release/libs/thread/test/test_6174.cpp
==============================================================================
--- branches/release/libs/thread/test/test_6174.cpp (original)
+++ branches/release/libs/thread/test/test_6174.cpp 2012-08-15 05:54:21 EDT (Wed, 15 Aug 2012)
@@ -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 @@
 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


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk