diff --git a/src/xenia/kernel/xobject.h b/src/xenia/kernel/xobject.h index aaf11c881..11d8ecb3c 100644 --- a/src/xenia/kernel/xobject.h +++ b/src/xenia/kernel/xobject.h @@ -348,6 +348,12 @@ bool operator!=(std::nullptr_t _Left, const object_ref<_Ty>& _Right) noexcept { return (!(_Left == _Right)); } +template +std::enable_if_t::value, object_ref> make_object( + Args&&... args) { + return object_ref(new T(std::forward(args)...)); +} + template object_ref retain_object(T* ptr) { if (ptr) ptr->Retain();