diff options
Diffstat (limited to 'boost/interprocess/detail')
-rw-r--r-- | boost/interprocess/detail/utilities.hpp | 18 | ||||
-rw-r--r-- | boost/interprocess/detail/win32_api.hpp | 6 | ||||
-rw-r--r-- | boost/interprocess/detail/workaround.hpp | 17 |
3 files changed, 25 insertions, 16 deletions
diff --git a/boost/interprocess/detail/utilities.hpp b/boost/interprocess/detail/utilities.hpp index 7ff3def65b..e1be2f1598 100644 --- a/boost/interprocess/detail/utilities.hpp +++ b/boost/interprocess/detail/utilities.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2012. +// (C) Copyright Ion Gaztanaga 2005-2015. // (C) Copyright Gennaro Prota 2003 - 2004. // // Distributed under the Boost Software License, Version 1.0. @@ -123,8 +123,8 @@ struct is_intrusive_index static const bool value = false; }; -template <typename T> T* -addressof(T& v) +template <typename T> +BOOST_INTERPROCESS_FORCEINLINE T* addressof(T& v) { return reinterpret_cast<T*>( &const_cast<char&>(reinterpret_cast<const volatile char &>(v))); @@ -148,7 +148,7 @@ inline bool multiplication_overflows(SizeType a, SizeType b) } template<std::size_t SztSizeOfType, class SizeType> -inline bool size_overflows(SizeType count) +BOOST_INTERPROCESS_FORCEINLINE bool size_overflows(SizeType count) { //Compile time-check BOOST_STATIC_ASSERT(SztSizeOfType <= SizeType(-1)); @@ -163,18 +163,18 @@ template<class T> class pointer_uintptr_caster<T*> { public: - BOOST_FORCEINLINE explicit pointer_uintptr_caster(uintptr_t sz) + BOOST_INTERPROCESS_FORCEINLINE explicit pointer_uintptr_caster(uintptr_t sz) : m_uintptr(sz) {} - BOOST_FORCEINLINE explicit pointer_uintptr_caster(const volatile T *p) + BOOST_INTERPROCESS_FORCEINLINE explicit pointer_uintptr_caster(const volatile T *p) : m_uintptr(reinterpret_cast<uintptr_t>(p)) {} - BOOST_FORCEINLINE uintptr_t uintptr() const + BOOST_INTERPROCESS_FORCEINLINE uintptr_t uintptr() const { return m_uintptr; } - BOOST_FORCEINLINE T* pointer() const + BOOST_INTERPROCESS_FORCEINLINE T* pointer() const { return reinterpret_cast<T*>(m_uintptr); } private: @@ -196,7 +196,7 @@ class value_eraser ~value_eraser() { if(m_erase) m_cont.erase(m_index_it); } - void release() { m_erase = false; } + BOOST_INTERPROCESS_FORCEINLINE void release() { m_erase = false; } private: Cont &m_cont; diff --git a/boost/interprocess/detail/win32_api.hpp b/boost/interprocess/detail/win32_api.hpp index 0329b6dbe4..f1bfee66d5 100644 --- a/boost/interprocess/detail/win32_api.hpp +++ b/boost/interprocess/detail/win32_api.hpp @@ -35,11 +35,11 @@ #include <windows.h> # if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME) -# include <Wbemidl.h> -# include <Objbase.h> +# include <wbemidl.h> +# include <objbase.h> # endif -#include <Shlobj.h> +#include <shlobj.h> #endif #if defined(_MSC_VER) diff --git a/boost/interprocess/detail/workaround.hpp b/boost/interprocess/detail/workaround.hpp index d7e86f464d..5089696fb6 100644 --- a/boost/interprocess/detail/workaround.hpp +++ b/boost/interprocess/detail/workaround.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2015. 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) // @@ -19,8 +19,6 @@ # pragma once #endif -#include <boost/interprocess/detail/config_begin.hpp> - #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define BOOST_INTERPROCESS_WINDOWS #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION @@ -191,6 +189,17 @@ #define BOOST_INTERPROCESS_I , #define BOOST_INTERPROCESS_DOCIGN(T1) T1 -#include <boost/interprocess/detail/config_end.hpp> +//#define BOOST_INTERPROCESS_DISABLE_FORCEINLINE + +#if defined(BOOST_INTERPROCESS_DISABLE_FORCEINLINE) + #define BOOST_INTERPROCESS_FORCEINLINE inline +#elif defined(BOOST_INTERPROCESS_FORCEINLINE_IS_BOOST_FORCELINE) + #define BOOST_INTERPROCESS_FORCEINLINE BOOST_FORCEINLINE +#elif defined(BOOST_MSVC) && defined(_DEBUG) + //"__forceinline" and MSVC seems to have some bugs in debug mode + #define BOOST_INTERPROCESS_FORCEINLINE inline +#else + #define BOOST_INTERPROCESS_FORCEINLINE BOOST_FORCEINLINE +#endif #endif //#ifndef BOOST_INTERPROCESS_DETAIL_WORKAROUND_HPP |