123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef BOOST_INTERPROCESS_UNIQUE_PTR_HPP_INCLUDED
- #define BOOST_INTERPROCESS_UNIQUE_PTR_HPP_INCLUDED
- #ifndef BOOST_CONFIG_HPP
- # include <boost/config.hpp>
- #endif
- #
- #if defined(BOOST_HAS_PRAGMA_ONCE)
- # pragma once
- #endif
- #include <boost/interprocess/detail/config_begin.hpp>
- #include <boost/interprocess/detail/workaround.hpp>
- #include <boost/move/unique_ptr.hpp>
- namespace boost{
- namespace interprocess{
- using ::boost::movelib::unique_ptr;
- template<class T, class ManagedMemory>
- struct managed_unique_ptr
- {
- typedef boost::movelib::unique_ptr
- < T
- , typename ManagedMemory::template deleter<T>::type
- > type;
- };
- template<class T, class ManagedMemory>
- inline typename managed_unique_ptr<T, ManagedMemory>::type
- make_managed_unique_ptr(T *constructed_object, ManagedMemory &managed_memory)
- {
- return typename managed_unique_ptr<T, ManagedMemory>::type
- (constructed_object, managed_memory.template get_deleter<T>());
- }
- }
- }
- #include <boost/interprocess/detail/config_end.hpp>
- #endif
|