diff options
Diffstat (limited to 'boost/interprocess/sync/shm/named_creation_functor.hpp')
-rw-r--r-- | boost/interprocess/sync/shm/named_creation_functor.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
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 { |