Introduce operator bool() and operator!() on vk::raii handle wrapper classes

Only if VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS is defined, as otherwise those checks are not meaningful.
This commit is contained in:
asuessenbach 2021-06-23 11:37:51 +02:00
parent 6d5d6661f3
commit 71e67fa32d
2 changed files with 764 additions and 224 deletions

View File

@ -2988,7 +2988,6 @@ ${moveAssignmentInstructions}
}
return *this;
}
${memberFunctionsDeclarations}
VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT
{
@ -3001,6 +3000,19 @@ ${getConstructorSuccessCode}
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:
${memberVariables}
};

File diff suppressed because it is too large Load Diff