Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52756 - in branches/release/boost/signals2: . detail
From: fmhess_at_[hidden]
Date: 2009-05-04 16:55:53


Author: fmhess
Date: 2009-05-04 16:55:52 EDT (Mon, 04 May 2009)
New Revision: 52756
URL: http://svn.boost.org/trac/boost/changeset/52756

Log:
Merged [52654] [52627] and [52477] from trunk.

Text files modified:
   branches/release/boost/signals2/deconstruct.hpp | 6 +++++-
   branches/release/boost/signals2/detail/stack_allocator.hpp | 22 ++++++++++++++++++++++
   2 files changed, 27 insertions(+), 1 deletions(-)

Modified: branches/release/boost/signals2/deconstruct.hpp
==============================================================================
--- branches/release/boost/signals2/deconstruct.hpp (original)
+++ branches/release/boost/signals2/deconstruct.hpp 2009-05-04 16:55:52 EDT (Mon, 04 May 2009)
@@ -43,10 +43,14 @@
 
 namespace detail
 {
- template< class T > T forward( T t )
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+ template< class T > T&& forward( T &&t )
   {
       return t;
   }
+#endif
+
   inline void adl_predestruct(...) {}
 } // namespace detail
 

Modified: branches/release/boost/signals2/detail/stack_allocator.hpp
==============================================================================
--- branches/release/boost/signals2/detail/stack_allocator.hpp (original)
+++ branches/release/boost/signals2/detail/stack_allocator.hpp 2009-05-04 16:55:52 EDT (Mon, 04 May 2009)
@@ -58,6 +58,10 @@
           _storage(storage)
         {
         }
+ template<typename U, std::size_t n>
+ stack_allocator(const stack_allocator<U, n> & other):
+ _storage(0)
+ {}
         typename base_class::pointer allocate(typename base_class::size_type n_elements,
           std::allocator<void>::const_pointer hint = 0)
         {
@@ -80,6 +84,24 @@
             base_class::deallocate(p, n);
           }
         }
+ bool operator==(const stack_allocator &other)
+ {
+ return _storage == other._storage;
+ }
+ bool operator!=(const stack_allocator &other)
+ {
+ return _storage != other._storage;
+ }
+ template<typename U, std::size_t n>
+ bool operator==(const stack_allocator<U, n> &other)
+ {
+ return _storage == 0 && other._storage == 0;
+ }
+ template<typename U, std::size_t n>
+ bool operator!=(const stack_allocator<U, n> &other)
+ {
+ return _storage != 0 || other._storage != 0;
+ }
       private:
         stack_storage<T, n_stack_elements> *_storage;
       };


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