diff --git a/object.hpp b/object.hpp index 4251cee..f5d257d 100644 --- a/object.hpp +++ b/object.hpp @@ -27,9 +27,9 @@ namespace cruft::vk { /// the base class for all non-trivial vulkan objects requiring lifetime /// management. - template + template struct object { - object (native_t _native): + object (native_t _native): m_native (_native) { CHECK_NEQ (m_native, VK_NULL_HANDLE); @@ -45,7 +45,7 @@ namespace cruft::vk { auto& native (void)& { return m_native; } protected: - native_t m_native; + native_t m_native; }; @@ -71,13 +71,13 @@ namespace cruft::vk { /// a vulkan object that must be directly instantiated through /// constructor arguments, rather than being enumerated and owned by /// another object. - template - struct descendant : public object { + template + struct descendant : public object { template descendant (ParentT &parent, Args &&...args): - object ( + object ( cruft::vk::error::try_query( - life_traits>::create, + life_traits>::create, parent.native (), std::forward (args)... ) @@ -87,17 +87,17 @@ namespace cruft::vk { ~descendant () { - life_traits>::destroy (this->native (), nullptr); + life_traits>::destroy (this->native (), nullptr); } }; /// a vulkan object that is obtained by listings from a parent object. - template - struct enumerated : public object { - using object::object; + template + struct enumerated : public object { + using object::object; - static std::vector + static std::vector find (const instance &parent); };