object: add make_owned for SelfT, OwnerT args

This commit is contained in:
Danny Robson 2017-09-13 16:52:16 +10:00
parent e284512d0d
commit 7c7192842e

View File

@ -200,6 +200,16 @@ namespace cruft::vk {
};
//-------------------------------------------------------------------------
template <typename SelfT, typename OwnerT>
auto
make_owned (native_t<SelfT> _native, OwnerT &_owner)
{
return owned_ptr<SelfT> {
SelfT (_native), _owner
};
}
//-------------------------------------------------------------------------
template <typename SelfT, typename OwnerT, typename ...Args>