Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-05-23 18:34:14


Author: igaztanaga
Date: 2008-05-23 18:34:14 EDT (Fri, 23 May 2008)
New Revision: 45697
URL: http://svn.boost.org/trac/boost/changeset/45697

Log:
#1912: some copy edits on boost.intrusive
#1932: move semantics for shared objects
#1635: Incomplete include guard in boost/intrusive
Text files modified:
   trunk/boost/interprocess/managed_external_buffer.hpp | 30 ++++++++++++++++++++++++++++--
   1 files changed, 28 insertions(+), 2 deletions(-)

Modified: trunk/boost/interprocess/managed_external_buffer.hpp
==============================================================================
--- trunk/boost/interprocess/managed_external_buffer.hpp (original)
+++ trunk/boost/interprocess/managed_external_buffer.hpp 2008-05-23 18:34:14 EDT (Fri, 23 May 2008)
@@ -46,6 +46,12 @@
    /// @endcond
 
    public:
+
+ //!Default constructor. Does nothing.
+ //!Useful in combination with move semantics
+ basic_managed_external_buffer()
+ {}
+
    //!Creates and places the segment manager. This can throw
    basic_managed_external_buffer
       (create_only_t, void *addr, std::size_t size)
@@ -71,7 +77,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_external_buffer
- (detail::moved_object<basic_managed_external_buffer> &moved)
+ (detail::moved_object<basic_managed_external_buffer> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_external_buffer
@@ -82,7 +88,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_external_buffer &operator=
- (detail::moved_object<basic_managed_external_buffer> &moved)
+ (detail::moved_object<basic_managed_external_buffer> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_external_buffer &operator=
@@ -100,6 +106,26 @@
 
 };
 
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_external_buffer
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
+
 } //namespace interprocess {
 } //namespace boost {
 


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