Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77885 - in trunk/boost/thread: . detail
From: vicente.botet_at_[hidden]
Date: 2012-04-10 09:29:37


Author: viboes
Date: 2012-04-10 09:29:36 EDT (Tue, 10 Apr 2012)
New Revision: 77885
URL: http://svn.boost.org/trac/boost/changeset/77885

Log:
Thread: move specialization of uses_allocator
Text files modified:
   trunk/boost/thread/detail/memory.hpp | 9 ---------
   trunk/boost/thread/future.hpp | 13 +++++++++++++
   2 files changed, 13 insertions(+), 9 deletions(-)

Modified: trunk/boost/thread/detail/memory.hpp
==============================================================================
--- trunk/boost/thread/detail/memory.hpp (original)
+++ trunk/boost/thread/detail/memory.hpp 2012-04-10 09:29:36 EDT (Tue, 10 Apr 2012)
@@ -49,15 +49,6 @@
   typedef container::allocator_arg_t allocator_arg_t;
   BOOST_CONSTEXPR allocator_arg_t allocator_arg = {};
 
- template <class R>
- class promise;
- namespace container
- {
- template <class R, class Alloc>
- struct uses_allocator<promise<R> , Alloc> : true_type
- {
- };
- }
   template <class T, class Alloc>
   struct uses_allocator: public container::uses_allocator<T, Alloc>
   {

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-04-10 09:29:36 EDT (Tue, 10 Apr 2012)
@@ -1645,6 +1645,16 @@
 
     };
 
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+ namespace container
+ {
+ template <class R, class Alloc>
+ struct uses_allocator<promise<R> , Alloc> : true_type
+ {
+ };
+ }
+#endif
+
 #ifdef BOOST_NO_RVALUE_REFERENCES
     template <typename T>
     struct has_move_emulation_enabled_aux<promise<T> >
@@ -2030,9 +2040,12 @@
     };
 
 #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+ namespace container
+ {
       template <class R, class Alloc>
       struct uses_allocator<packaged_task<R>, Alloc>
         : public true_type {};
+ }
 #endif
 
 #ifdef BOOST_NO_RVALUE_REFERENCES


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