diff options
Diffstat (limited to 'boost/interprocess/sync/shm/named_creation_functor.hpp')
-rw-r--r-- | boost/interprocess/sync/shm/named_creation_functor.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/boost/interprocess/sync/shm/named_creation_functor.hpp b/boost/interprocess/sync/shm/named_creation_functor.hpp index 9d752c837a..234e072aac 100644 --- a/boost/interprocess/sync/shm/named_creation_functor.hpp +++ b/boost/interprocess/sync/shm/named_creation_functor.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2007-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2007-2012. 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) // @@ -11,6 +11,10 @@ #ifndef BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP #define BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/interprocess/creation_tags.hpp> #include <boost/interprocess/detail/type_traits.hpp> #include <boost/interprocess/detail/mpl.hpp> @@ -38,7 +42,7 @@ class named_creation_functor { new(address)T(m_arg); } bool operator()(void *address, std::size_t, bool created) const - { + { switch(m_creation_type){ case DoOpen: return true; @@ -56,6 +60,10 @@ class named_creation_functor break; } } + + std::size_t get_min_size() const + { return sizeof(T); } + private: create_enum_t m_creation_type; Arg m_arg; |