File indexing completed on 2025-12-16 09:53:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_INTERPROCESS_UNIQUE_PTR_HPP_INCLUDED
0012 #define BOOST_INTERPROCESS_UNIQUE_PTR_HPP_INCLUDED
0013
0014 #ifndef BOOST_CONFIG_HPP
0015 # include <boost/config.hpp>
0016 #endif
0017 #
0018 #if defined(BOOST_HAS_PRAGMA_ONCE)
0019 # pragma once
0020 #endif
0021
0022 #include <boost/interprocess/detail/config_begin.hpp>
0023 #include <boost/interprocess/detail/workaround.hpp>
0024 #include <boost/move/unique_ptr.hpp>
0025
0026
0027
0028
0029 namespace boost{
0030 namespace interprocess{
0031
0032
0033 using ::boost::movelib::unique_ptr;
0034
0035
0036
0037
0038 template<class T, class ManagedMemory>
0039 struct managed_unique_ptr
0040 {
0041 typedef boost::movelib::unique_ptr
0042 < T
0043 , typename ManagedMemory::template deleter<T>::type
0044 > type;
0045 };
0046
0047
0048
0049
0050 template<class T, class ManagedMemory>
0051 inline typename managed_unique_ptr<T, ManagedMemory>::type
0052 make_managed_unique_ptr(T *constructed_object, ManagedMemory &managed_memory)
0053 {
0054 return typename managed_unique_ptr<T, ManagedMemory>::type
0055 (constructed_object, managed_memory.template get_deleter<T>());
0056 }
0057
0058 }
0059 }
0060
0061 #include <boost/interprocess/detail/config_end.hpp>
0062
0063 #endif