Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76073 - trunk/boost/thread
From: vicente.botet_at_[hidden]
Date: 2011-12-19 18:20:31


Author: viboes
Date: 2011-12-19 18:20:31 EST (Mon, 19 Dec 2011)
New Revision: 76073
URL: http://svn.boost.org/trac/boost/changeset/76073

Log:
Thread: dont use thread_move_t when BOOST_NO_RVALUE_REFERENCES is not defined
Text files modified:
   trunk/boost/thread/future.hpp | 19 +++++++++++++++++++
   1 files changed, 19 insertions(+), 0 deletions(-)

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2011-12-19 18:20:31 EST (Mon, 19 Dec 2011)
@@ -1226,9 +1226,15 @@
             task_object(F const& f_):
                 f(f_)
             {}
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ task_object(F&& f_):
+ f(f_)
+ {}
+#else
             task_object(boost::detail::thread_move_t<F> f_):
                 f(f_)
             {}
+#endif
 
             void do_run()
             {
@@ -1251,9 +1257,15 @@
             task_object(F const& f_):
                 f(f_)
             {}
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ task_object(F&& f_):
+ f(f_)
+ {}
+#else
             task_object(boost::detail::thread_move_t<F> f_):
                 f(f_)
             {}
+#endif
 
             void do_run()
             {
@@ -1295,10 +1307,17 @@
             task(new detail::task_object<R,R(*)()>(f)),future_obtained(false)
         {}
 
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template <class F>
+ explicit packaged_task(F&& f):
+ task(new detail::task_object<R,F>(f)),future_obtained(false)
+ {}
+#else
         template <class F>
         explicit packaged_task(boost::detail::thread_move_t<F> f):
             task(new detail::task_object<R,F>(f)),future_obtained(false)
         {}
+#endif
 
 // template <class F, class Allocator>
 // explicit packaged_task(F const& f, Allocator a);


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