Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79980 - in trunk: boost/thread libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2012-08-12 12:36:41


Author: viboes
Date: 2012-08-12 12:36:40 EDT (Sun, 12 Aug 2012)
New Revision: 79980
URL: http://svn.boost.org/trac/boost/changeset/79980

Log:
Thread: refix 6174
Text files modified:
   trunk/boost/thread/future.hpp | 2 +-
   trunk/libs/thread/test/test_6174.cpp | 17 +++++++++++++++--
   2 files changed, 16 insertions(+), 3 deletions(-)

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-08-12 12:36:40 EDT (Sun, 12 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: trunk/libs/thread/test/test_6174.cpp
==============================================================================
--- trunk/libs/thread/test/test_6174.cpp (original)
+++ trunk/libs/thread/test/test_6174.cpp 2012-08-12 12:36:40 EDT (Sun, 12 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