From c45171964f61a6a818989b4739953265f8af1671 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Mon, 29 Feb 2016 22:17:33 -0800 Subject: [PATCH] make_shared --- moo/moocpp/utils.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/moo/moocpp/utils.h b/moo/moocpp/utils.h index a4899e2e..0f2c59ef 100644 --- a/moo/moocpp/utils.h +++ b/moo/moocpp/utils.h @@ -104,6 +104,12 @@ std::unique_ptr make_unique(Args&&... args) return std::unique_ptr (new T (std::forward (args)...)); } +template +std::shared_ptr make_shared (Args&&... args) +{ + return std::shared_ptr (new T (std::forward (args)...)); +} + class raii { public: