13 #include <boost/smart_ptr/shared_ptr.hpp>
14 #include <boost/smart_ptr/make_shared.hpp>
15 #include "../internal/helpers.h"
19 template <
class t_Value>
23 using Pointer = boost::shared_ptr<t_Value>;
30 ptr = boost::make_shared<t_Value>();
40 return (
nullptr == ptr);
44 #define ARILES2_POINTER_TYPE boost::shared_ptr
45 #define ARILES2_POINTER_HANDLER BoostSharedPtrHandler
50 #if BOOST_VERSION >= 105800
51 # include <boost/move/unique_ptr.hpp>
52 # include <boost/move/make_unique.hpp>
56 template <
class t_Value>
57 class PointerHandler<boost::movelib::unique_ptr<t_Value>>
60 using Pointer = boost::movelib::unique_ptr<t_Value>;
61 using Value = t_Value;
65 static void allocate(Pointer &ptr)
67 ptr = boost::movelib::make_unique<t_Value>();
70 static void reset(Pointer &ptr)
75 static bool isNull(
const Pointer &ptr)
77 return (
nullptr == ptr);
82 # define ARILES2_POINTER_TYPE boost::movelib::unique_ptr
static bool isNull(const Pointer &ptr)
boost::shared_ptr< t_Value > Pointer
static void reset(Pointer &ptr)
static void allocate(Pointer &ptr)