Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80789 - in trunk/libs/thread: example test/sync/futures/promise
From: vicente.botet_at_[hidden]
Date: 2012-09-30 13:33:57


Author: viboes
Date: 2012-09-30 13:33:56 EDT (Sun, 30 Sep 2012)
New Revision: 80789
URL: http://svn.boost.org/trac/boost/changeset/80789

Log:
Thread: make the code of tests set_rvalue and make_future more portable
Text files modified:
   trunk/libs/thread/example/make_future.cpp | 4 ++--
   trunk/libs/thread/test/sync/futures/promise/set_rvalue_pass.cpp | 2 +-
   2 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/libs/thread/example/make_future.cpp
==============================================================================
--- trunk/libs/thread/example/make_future.cpp (original)
+++ trunk/libs/thread/example/make_future.cpp 2012-09-30 13:33:56 EDT (Sun, 30 Sep 2012)
@@ -17,7 +17,7 @@
   if (x < 0) return boost::make_future(-1);
   //boost::future<int> f1 = boost::async([]() { return x+1; });
   boost::future<int> f1 = boost::async(p1);
- return f1;
+ return boost::move(f1);
 }
 boost::shared_future<int> shared_compute(int x)
 {
@@ -25,7 +25,7 @@
   if (x < 0) return boost::make_shared_future(-1);
   //boost::future<int> f1 = boost::async([]() { return x+1; });
   boost::shared_future<int> f1 = boost::async(p1).share();
- return f1;
+ return boost::move(f1);
 }
 
 

Modified: trunk/libs/thread/test/sync/futures/promise/set_rvalue_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/set_rvalue_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/set_rvalue_pass.cpp 2012-09-30 13:33:56 EDT (Sun, 30 Sep 2012)
@@ -36,7 +36,7 @@
     value(i)
   {
   }
- A(const A&)= delete;
+ BOOST_THREAD_DELETE_COPY_CTOR(A)
   A(A&& rhs)
   {
     if(rhs.value==0)


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