Introduce constructor and assignment operator on nullptr_t (#77)

Fix issue #77
This commit is contained in:
Andreas Süßenbach
2017-02-14 13:56:11 +01:00
committed by Markus Tavenrath
parent 43b2c5ef66
commit f0eff17d9b
2 changed files with 331 additions and 0 deletions

View File

@@ -3338,6 +3338,10 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c
<< " : m_" << memberName << "(VK_NULL_HANDLE)" << std::endl
<< " {}" << std::endl
<< std::endl
<< " " << dependencyData.name << "( nullptr_t )" << std::endl
<< " : m_" << memberName << "(VK_NULL_HANDLE)" << std::endl
<< " {}" << std::endl
<< std::endl
<< "#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)" << std::endl
// construct from native handle
<< " " << dependencyData.name << "(Vk" << dependencyData.name << " " << memberName << ")" << std::endl
@@ -3352,6 +3356,13 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c
<< " }" << std::endl
<< "#endif\n"
<< std::endl
// assignment from nullptr_t
<< " " << dependencyData.name << "& operator=( nullptr_t )" << std::endl
<< " {" << std::endl
<< " m_" << memberName << " = VK_NULL_HANDLE;" << std::endl
<< " return *this;" << std::endl
<< " }" << std::endl
<< std::endl
// operator==
<< " bool operator==" << "(" << dependencyData.name << " const &rhs) const" << std::endl
<< " {" << std::endl