sessiond: propagate the use of ltt_session::locked_ref
[lttng-tools.git] / src / common / make-unique-wrapper.hpp
index a0a4b541a2fd64bc7c01da8babd6b5c01bb54d5c..bfb5d6bb27bc4537e4a4e3c6d35d4c38f4316797 100644 (file)
@@ -9,6 +9,7 @@
 #define LTTNG_MAKE_UNIQUE_WRAPPER_H
 
 #include <common/macros.hpp>
+#include <common/meta-helpers.hpp>
 
 #include <memory>
 
@@ -39,21 +40,6 @@ namespace lttng {
  */
 
 namespace memory {
-template <typename WrappedType, void (*DeleterFunction)(WrappedType *)>
-struct create_deleter_class {
-       struct deleter {
-               void operator()(WrappedType *instance) const
-               {
-                       DeleterFunction(instance);
-               }
-       };
-
-       std::unique_ptr<WrappedType, deleter> operator()(WrappedType *instance) const
-       {
-               return std::unique_ptr<WrappedType, deleter>(instance);
-       }
-};
-
 /*
  * 'free' is a utility function for use with make_unique_wrapper. It makes it easier to
  * wrap raw pointers that have to be deleted with `free`. Using libc's 'free' as
This page took 0.023392 seconds and 4 git commands to generate.