summaryrefslogtreecommitdiff
path: root/boost/interprocess/offset_ptr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/offset_ptr.hpp')
-rw-r--r--boost/interprocess/offset_ptr.hpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/boost/interprocess/offset_ptr.hpp b/boost/interprocess/offset_ptr.hpp
index 5f523ce521..dca55668b6 100644
--- a/boost/interprocess/offset_ptr.hpp
+++ b/boost/interprocess/offset_ptr.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_OFFSET_PTR_HPP
#define BOOST_INTERPROCESS_OFFSET_PTR_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -22,13 +26,9 @@
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/cast_tags.hpp>
#include <boost/interprocess/detail/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp> //alignment_of, aligned_storage
#include <boost/assert.hpp>
-#include <ostream>
-#include <istream>
-#include <iterator>
-#include <iostream>
-#include <boost/aligned_storage.hpp>
-#include <boost/type_traits/alignment_of.hpp>
+#include <iosfwd>
//!\file
//!Describes a smart pointer that stores the offset between this pointer and
@@ -40,9 +40,6 @@ namespace boost {
//Predeclarations
template <class T>
-struct has_trivial_constructor;
-
-template <class T>
struct has_trivial_destructor;
#endif //#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
@@ -59,10 +56,10 @@ namespace ipcdetail {
: m_offset(off)
{}
OffsetType m_offset; //Distance between this object and pointee address
- typename ::boost::aligned_storage
+ typename ::boost::container::container_detail::aligned_storage
< sizeof(OffsetType)
, (OffsetAlignment == offset_type_alignment) ?
- ::boost::alignment_of<OffsetType>::value : OffsetAlignment
+ ::boost::container::container_detail::alignment_of<OffsetType>::value : OffsetAlignment
>::type alignment_helper;
};
@@ -86,7 +83,7 @@ namespace ipcdetail {
#endif
template<int Dummy>
#ifndef BOOST_INTERPROCESS_OFFSET_PTR_INLINE_TO_PTR
- BOOST_INTERPROCESS_NEVER_INLINE
+ BOOST_NOINLINE
#elif defined(NDEBUG)
inline
#endif
@@ -128,7 +125,7 @@ namespace ipcdetail {
template<int Dummy>
#ifndef BOOST_INTERPROCESS_OFFSET_PTR_INLINE_TO_OFF
- BOOST_INTERPROCESS_NEVER_INLINE
+ BOOST_NOINLINE
#elif defined(NDEBUG)
inline
#endif
@@ -177,7 +174,7 @@ namespace ipcdetail {
template<int Dummy>
#ifndef BOOST_INTERPROCESS_OFFSET_PTR_INLINE_TO_OFF_FROM_OTHER
- BOOST_INTERPROCESS_NEVER_INLINE
+ BOOST_NOINLINE
#elif defined(NDEBUG)
inline
#endif
@@ -642,20 +639,23 @@ inline boost::interprocess::offset_ptr<T1, P1, O1, A1>
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
-//!has_trivial_constructor<> == true_type specialization for optimizations
+///has_trivial_destructor<> == true_type specialization for optimizations
template <class T, class P, class O, std::size_t A>
-struct has_trivial_constructor< boost::interprocess::offset_ptr<T, P, O, A> >
+struct has_trivial_destructor< ::boost::interprocess::offset_ptr<T, P, O, A> >
{
static const bool value = true;
};
+namespace move_detail {
+
///has_trivial_destructor<> == true_type specialization for optimizations
template <class T, class P, class O, std::size_t A>
-struct has_trivial_destructor< boost::interprocess::offset_ptr<T, P, O, A> >
+struct is_trivially_destructible< ::boost::interprocess::offset_ptr<T, P, O, A> >
{
static const bool value = true;
};
+} //namespace move_detail {
namespace interprocess {