Introduce helper function ResultValue<UniqueHandle<Type, Dispatch>>::asTuple()
Allows coding like this:
vk::Result result;
vk::UniquePipeline pipeline;
std::tie( result, pipeline ) =
device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo ).asTuple();
This commit is contained in:
@@ -16369,8 +16369,10 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
, value( std::move( v ) )
|
||||
{}
|
||||
|
||||
Result result;
|
||||
UniqueHandle<Type, Dispatch> value;
|
||||
std::tuple<Result, UniqueHandle<Type, Dispatch>> asTuple()
|
||||
{
|
||||
return std::make_tuple( result, std::move( value ) );
|
||||
}
|
||||
|
||||
# if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST )
|
||||
VULKAN_HPP_DEPRECATED(
|
||||
@@ -16387,6 +16389,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
return std::move( value );
|
||||
}
|
||||
# endif
|
||||
|
||||
Result result;
|
||||
UniqueHandle<Type, Dispatch> value;
|
||||
};
|
||||
|
||||
template <typename Type, typename Dispatch>
|
||||
|
||||
Reference in New Issue
Block a user