object: add make_owned for SelfT, OwnerT args
This commit is contained in:
parent
e284512d0d
commit
7c7192842e
10
object.hpp
10
object.hpp
@ -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>
|
template <typename SelfT, typename OwnerT, typename ...Args>
|
||||||
|
Loading…
Reference in New Issue
Block a user