Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81136 - in trunk/boost/thread: . detail
From: vicente.botet_at_[hidden]
Date: 2012-11-01 17:49:21


Author: viboes
Date: 2012-11-01 17:49:20 EDT (Thu, 01 Nov 2012)
New Revision: 81136
URL: http://svn.boost.org/trac/boost/changeset/81136

Log:
Thread: Add the function pointer overloads with MSVC even if it supports rvalue references.
Text files modified:
   trunk/boost/thread/detail/config.hpp | 5 +++++
   trunk/boost/thread/future.hpp | 16 ++++++++--------
   2 files changed, 13 insertions(+), 8 deletions(-)

Modified: trunk/boost/thread/detail/config.hpp
==============================================================================
--- trunk/boost/thread/detail/config.hpp (original)
+++ trunk/boost/thread/detail/config.hpp 2012-11-01 17:49:20 EDT (Thu, 01 Nov 2012)
@@ -49,6 +49,11 @@
 #define BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
 #endif
 
+#if defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC
+#define BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
+#endif
+
+
 // Default version is 2
 #if !defined BOOST_THREAD_VERSION
 #define BOOST_THREAD_VERSION 2

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-11-01 17:49:20 EDT (Thu, 01 Nov 2012)
@@ -1100,7 +1100,7 @@
 // template<typename F>
 // auto then(F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
 
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
         template<typename RF>
         inline BOOST_THREAD_FUTURE<RF> then(RF(*func)(BOOST_THREAD_FUTURE&));
 #endif
@@ -1609,7 +1609,7 @@
                 }
             }
         };
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
 
 #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
 #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
@@ -1811,7 +1811,7 @@
         {}
 
         // construction and destruction
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
 
 #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
   #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
@@ -1902,7 +1902,7 @@
 #endif
 
 #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
         template <class Allocator>
         packaged_task(boost::allocator_arg_t, Allocator a, R(*f)())
         {
@@ -1923,7 +1923,7 @@
           task = task_ptr(::new(a2.allocate(1)) task_object_type(f), D(a2, 1) );
           future_obtained = false;
         }
-#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif // BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
 
 #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
         template <class F, class Allocator>
@@ -2097,7 +2097,7 @@
 
     BOOST_THREAD_DCL_MOVABLE_BEG(T) packaged_task<T> BOOST_THREAD_DCL_MOVABLE_END
 
-#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
 
 #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
   #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
@@ -2284,7 +2284,7 @@
         future_continuation(future_continuation const&);
         future_continuation& operator=(future_continuation const&);
       };
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
       template <typename F, typename R, typename CR>
       struct future_continuation<F,R,CR(*)(F&)> : future_continuation_base
       {
@@ -2349,7 +2349,7 @@
 
   }
 
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
   template <typename R>
   template<typename RF>
   BOOST_THREAD_FUTURE<RF>


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