diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index a22e6d8..969ed79 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -381,8 +381,8 @@ const std::string structureChainHeader = R"( StructureChain& operator=(StructureChain const &rhs) { - linkAndCopy(rhs); - return this; + linkAndCopy(rhs); + return *this; } template ClassType& get() { return static_cast(*this);} @@ -607,13 +607,28 @@ const std::string uniqueHandleHeader = R"( { return &m_value; } - + + Type * operator->() + { + return &m_value; + } + Type const& operator*() const { return m_value; } - Type get() const + Type & operator*() + { + return m_value; + } + + const Type & get() const + { + return m_value; + } + + Type & get() { return m_value; } diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index a276624..e8928d7 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -361,13 +361,28 @@ namespace vk { return &m_value; } - + + Type * operator->() + { + return &m_value; + } + Type const& operator*() const { return m_value; } - Type get() const + Type & operator*() + { + return m_value; + } + + const Type & get() const + { + return m_value; + } + + Type & get() { return m_value; }