diff options
Diffstat (limited to 'boost/interprocess/sync/shm')
7 files changed, 38 insertions, 9 deletions
diff --git a/boost/interprocess/sync/shm/named_condition.hpp b/boost/interprocess/sync/shm/named_condition.hpp index e2ff280b7b..e58f5ded7b 100644 --- a/boost/interprocess/sync/shm/named_condition.hpp +++ b/boost/interprocess/sync/shm/named_condition.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_SHM_NAMED_CONDITION_HPP #define BOOST_INTERPROCESS_SHM_NAMED_CONDITION_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif diff --git a/boost/interprocess/sync/shm/named_condition_any.hpp b/boost/interprocess/sync/shm/named_condition_any.hpp index 46bca92e45..6eb06b48ef 100644 --- a/boost/interprocess/sync/shm/named_condition_any.hpp +++ b/boost/interprocess/sync/shm/named_condition_any.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_SHM_NAMED_CONDITION_ANY_HPP #define BOOST_INTERPROCESS_SHM_NAMED_CONDITION_ANY_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif diff --git a/boost/interprocess/sync/shm/named_creation_functor.hpp b/boost/interprocess/sync/shm/named_creation_functor.hpp index 234e072aac..b4cc7786cb 100644 --- a/boost/interprocess/sync/shm/named_creation_functor.hpp +++ b/boost/interprocess/sync/shm/named_creation_functor.hpp @@ -11,13 +11,18 @@ #ifndef BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP #define BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif #include <boost/interprocess/creation_tags.hpp> #include <boost/interprocess/detail/type_traits.hpp> #include <boost/interprocess/detail/mpl.hpp> +#include <boost/container/detail/placement_new.hpp> namespace boost { namespace interprocess { @@ -35,11 +40,11 @@ class named_creation_functor template<class ArgType> void construct(void *address, typename enable_if_c<is_same<ArgType, no_arg_t>::value>::type * = 0) const - { new(address)T; } + { ::new(address, boost_container_new_t())T; } template<class ArgType> void construct(void *address, typename enable_if_c<!is_same<ArgType, no_arg_t>::value>::type * = 0) const - { new(address)T(m_arg); } + { ::new(address, boost_container_new_t())T(m_arg); } bool operator()(void *address, std::size_t, bool created) const { diff --git a/boost/interprocess/sync/shm/named_mutex.hpp b/boost/interprocess/sync/shm/named_mutex.hpp index fc66f3a704..846727463f 100644 --- a/boost/interprocess/sync/shm/named_mutex.hpp +++ b/boost/interprocess/sync/shm/named_mutex.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_SHM_NAMED_MUTEX_HPP #define BOOST_INTERPROCESS_SHM_NAMED_MUTEX_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif diff --git a/boost/interprocess/sync/shm/named_recursive_mutex.hpp b/boost/interprocess/sync/shm/named_recursive_mutex.hpp index 988ef66315..345eedaf55 100644 --- a/boost/interprocess/sync/shm/named_recursive_mutex.hpp +++ b/boost/interprocess/sync/shm/named_recursive_mutex.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_SHM_NAMED_RECURSIVE_MUTEX_HPP #define BOOST_INTERPROCESS_SHM_NAMED_RECURSIVE_MUTEX_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif diff --git a/boost/interprocess/sync/shm/named_semaphore.hpp b/boost/interprocess/sync/shm/named_semaphore.hpp index d952d12e14..4ac93e08fd 100644 --- a/boost/interprocess/sync/shm/named_semaphore.hpp +++ b/boost/interprocess/sync/shm/named_semaphore.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_SHM_NAMED_SEMAPHORE_HPP #define BOOST_INTERPROCESS_SHM_NAMED_SEMAPHORE_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif diff --git a/boost/interprocess/sync/shm/named_upgradable_mutex.hpp b/boost/interprocess/sync/shm/named_upgradable_mutex.hpp index 4c397927fb..ced2243bed 100644 --- a/boost/interprocess/sync/shm/named_upgradable_mutex.hpp +++ b/boost/interprocess/sync/shm/named_upgradable_mutex.hpp @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_NAMED_UPGRADABLE_MUTEX_HPP #define BOOST_INTERPROCESS_NAMED_UPGRADABLE_MUTEX_HPP -#if defined(_MSC_VER) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif |