diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 9086b94..c1ba37d 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -945,17 +945,18 @@ namespace VULKAN_HPP_NAMESPACE } template - VULKAN_HPP_INLINE ResultValue createResultValue( Result result, T & data, char const * message, std::initializer_list successCodes ) + VULKAN_HPP_INLINE typename ResultValueType::type createResultValue( Result result, T & data, char const * message, std::initializer_list successCodes ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS assert( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); + return ResultValue( result, data ); #else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { throwResultException( result, message ); } #endif - return ResultValue( result, data ); + return data; } using SampleMask = uint32_t;