diff options
Diffstat (limited to 'boost/interprocess/sync/xsi/xsi_named_mutex.hpp')
-rw-r--r-- | boost/interprocess/sync/xsi/xsi_named_mutex.hpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/boost/interprocess/sync/xsi/xsi_named_mutex.hpp b/boost/interprocess/sync/xsi/xsi_named_mutex.hpp index 485b1ac101..1c4ee78a4f 100644 --- a/boost/interprocess/sync/xsi/xsi_named_mutex.hpp +++ b/boost/interprocess/sync/xsi/xsi_named_mutex.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2009-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2009-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_XSI_XSI_NAMED_MUTEX_HPP #define BOOST_INTERPROCESS_XSI_XSI_NAMED_MUTEX_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/detail/config_begin.hpp> #include <boost/interprocess/detail/workaround.hpp> @@ -18,7 +22,7 @@ #error "This header can't be used in Windows operating systems" #endif -#include <boost/move/move.hpp> +#include <boost/move/utility_core.hpp> #include <boost/interprocess/creation_tags.hpp> #include <boost/interprocess/exceptions.hpp> #include <boost/interprocess/detail/utilities.hpp> @@ -42,11 +46,11 @@ namespace interprocess { //!that undoes the operation if the process crashes. class xsi_named_mutex { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //Non-copyable and non-assignable xsi_named_mutex(xsi_named_mutex &); xsi_named_mutex &operator=(xsi_named_mutex &); - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: BOOST_MOVABLE_BUT_NOT_COPYABLE(xsi_named_mutex) @@ -72,10 +76,10 @@ class xsi_named_mutex //!After the call, "moved" does not represent any named mutex. //!Does not throw xsi_named_mutex &operator=(BOOST_RV_REF(xsi_named_mutex) moved) - { + { xsi_named_mutex tmp(boost::move(moved)); this->swap(tmp); - return *this; + return *this; } //!Swaps two xsi_named_mutex. Does not throw @@ -105,7 +109,7 @@ class xsi_named_mutex void unlock(); - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: //!Closes a previously opened file mapping. Never throws. @@ -121,10 +125,10 @@ class xsi_named_mutex boost::uint8_t m_id; int m_perm; std::string m_path; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) inline xsi_named_mutex::xsi_named_mutex() : m_semid(-1), m_key(-1), m_id(0), m_perm(0), m_path() @@ -142,7 +146,7 @@ inline void xsi_named_mutex::swap(xsi_named_mutex &other) std::swap(m_id, other.m_id); std::swap(m_semid, other.m_semid); std::swap(m_perm, other.m_perm); - m_path.swap(other.m_path); + m_path.swap(other.m_path); } inline mapping_handle_t xsi_named_mutex::get_mapping_handle() const @@ -218,7 +222,7 @@ inline bool xsi_named_mutex::remove() return false; } -///@endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED } //namespace interprocess { } //namespace boost { |