summaryrefslogtreecommitdiff
path: root/boost/interprocess/sync/scoped_lock.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/sync/scoped_lock.hpp')
-rw-r--r--boost/interprocess/sync/scoped_lock.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/boost/interprocess/sync/scoped_lock.hpp b/boost/interprocess/sync/scoped_lock.hpp
index c095530..97986f0 100644
--- a/boost/interprocess/sync/scoped_lock.hpp
+++ b/boost/interprocess/sync/scoped_lock.hpp
@@ -16,7 +16,11 @@
#ifndef BOOST_INTERPROCESS_SCOPED_LOCK_HPP
#define BOOST_INTERPROCESS_SCOPED_LOCK_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -29,6 +33,7 @@
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
+#include <boost/interprocess/detail/simple_swap.hpp>
//!\file
//!Describes the scoped_lock class.
@@ -353,8 +358,8 @@ class scoped_lock
//!Throws: Nothing.
void swap( scoped_lock<mutex_type> &other)
{
- std::swap(mp_mutex, other.mp_mutex);
- std::swap(m_locked, other.m_locked);
+ (simple_swap)(mp_mutex, other.mp_mutex);
+ (simple_swap)(m_locked, other.m_locked);
}
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)