From 7c7192842e005c0c3a55ca2e549623d1891b7292 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 13 Sep 2017 16:52:16 +1000 Subject: [PATCH] object: add make_owned for SelfT, OwnerT args --- object.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/object.hpp b/object.hpp index 9d33c4e..805c27d 100644 --- a/object.hpp +++ b/object.hpp @@ -200,6 +200,16 @@ namespace cruft::vk { }; + //------------------------------------------------------------------------- + template + auto + make_owned (native_t _native, OwnerT &_owner) + { + return owned_ptr { + SelfT (_native), _owner + }; + } + //------------------------------------------------------------------------- template