From: Amnon Hanuhov Date: Thu, 8 Apr 2021 14:08:45 +0000 (+0300) Subject: msg: Define a new make_message that returns the message inside a unique_ptr X-Git-Tag: v17.1.0~2024^2~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bee890ab34a3b000cb882e13b72238a80158417a;p=ceph.git msg: Define a new make_message that returns the message inside a unique_ptr Currently under the crimson::net namespace Signed-off-by: Amnon Hanuhov --- diff --git a/src/msg/Message.h b/src/msg/Message.h index 8e1c4f967f059..d2f75397cac5a 100644 --- a/src/msg/Message.h +++ b/src/msg/Message.h @@ -553,4 +553,10 @@ ceph::ref_t make_message(Args&&... args) { } } +namespace crimson::net { +template +MURef make_message(Args&&... args) { + return {new T(std::forward(args)...), TOPNSPC::common::UniquePtrDeleter{}}; +} +} #endif