Merge pull request #996 from asuessenbach/bool

Introduce operator bool() and operator!() on vk::raii handle wrapper classes
This commit is contained in:
Andreas Süßenbach 2021-06-23 13:21:53 +02:00 committed by GitHub
commit f7c7f821a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 764 additions and 224 deletions

View File

@ -2988,7 +2988,6 @@ ${moveAssignmentInstructions}
} }
return *this; return *this;
} }
${memberFunctionsDeclarations}
VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT
{ {
@ -3001,6 +3000,19 @@ ${getConstructorSuccessCode}
return ${getDispatcherReturn}m_dispatcher; return ${getDispatcherReturn}m_dispatcher;
} }
#if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
explicit operator bool() const VULKAN_HPP_NOEXCEPT
{
return m_${handleName}.operator bool();
}
bool operator!() const VULKAN_HPP_NOEXCEPT
{
return m_${handleName}.operator!();
}
#endif
${memberFunctionsDeclarations}
private: private:
${memberVariables} ${memberVariables}
}; };

File diff suppressed because it is too large Load Diff