]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg: Define unique_ptr messages
authorAmnon Hanuhov <ahanukov@redhat.com>
Thu, 8 Apr 2021 14:02:06 +0000 (17:02 +0300)
committerAmnon Hanuhov <ahanukov@redhat.com>
Thu, 6 May 2021 17:22:05 +0000 (20:22 +0300)
Signed-off-by: Amnon Hanuhov <ahanukov@redhat.com>
src/msg/MessageRef.h

index 2c11aced52b34f559503726120f1aec6cee1f5ee..cd5b2dd741a247cfacbdad3aca35b5bcace17b6d 100644 (file)
 #define CEPH_MESSAGEREF_H
  
 #include <boost/intrusive_ptr.hpp>
+#include "common/RefCountedObj.h"
 
 template<typename T>
 using MRef = boost::intrusive_ptr<T>;
 template<typename T>
 using MConstRef = boost::intrusive_ptr<T const>;
+template<typename T>
+using MURef = std::unique_ptr<T, TOPNSPC::common::UniquePtrDeleter>;
 
 using MessageRef = MRef<class Message>;
 using MessageConstRef = MConstRef<class Message>;
+using MessageURef = MURef<class Message>;
 
 /* cd src/messages/ && for f in *; do printf 'class '; basename "$f" .h | tr -d '\n'; printf ';\n'; done >> ../msg/MessageRef.h */