Merge pull request #634 from asuessenbach/ResultValue

Add cast operator to reference of UniqueHandle of ResultValue<UniqueHandle>
This commit is contained in:
Andreas Süßenbach
2020-06-17 13:35:30 +02:00
committed by GitHub
4 changed files with 47 additions and 46 deletions

View File

@@ -15887,15 +15887,6 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Type, typename Dispatch>
struct ResultValue<UniqueHandle<Type, Dispatch>>
{
# ifdef VULKAN_HPP_HAS_NOEXCEPT
ResultValue( Result r, UniqueHandle<Type, Dispatch> & v ) VULKAN_HPP_NOEXCEPT
# else
ResultValue( Result r, UniqueHandle<Type, Dispatch> & v )
# endif
: result( r )
, value( v )
{}
# ifdef VULKAN_HPP_HAS_NOEXCEPT
ResultValue( Result r, UniqueHandle<Type, Dispatch> && v ) VULKAN_HPP_NOEXCEPT
# else
@@ -15913,6 +15904,11 @@ namespace VULKAN_HPP_NAMESPACE
return std::tuple<Result &, UniqueHandle<Type, Dispatch> &>( result, value );
}
operator UniqueHandle<Type, Dispatch> &() & VULKAN_HPP_NOEXCEPT
{
return value;
}
operator UniqueHandle<Type, Dispatch>() VULKAN_HPP_NOEXCEPT
{
return std::move( value );