Extent support of functions returning some typed value

This commit is contained in:
asuessenbach 2022-11-14 10:06:49 +01:00
parent afcf27d6a8
commit 196978705e
3 changed files with 12 additions and 17 deletions

View File

@ -4013,13 +4013,11 @@ std::string
if ( returnParams.empty() )
{
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandData.params );
if ( vectorParams.empty() )
{
if ( determineConstPointerParams( commandData.params ).empty() )
if ( vectorParams.empty() && determineConstPointerParams( commandData.params ).empty() )
{
return generateCommandSetStandard( generateCommandStandard( name, commandData, initialSkipCount, definition ) );
}
else
else if ( vectorParams.size() <= 1 )
{
return generateCommandSetStandardEnhanced(
definition,
@ -4027,7 +4025,6 @@ std::string
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false, false ) );
}
}
}
return "";
}
@ -7110,7 +7107,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandValue( std::map<std::st
if ( returnParams.empty() )
{
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandIt->second.params );
if ( vectorParams.empty() )
if ( vectorParams.size() <= 1 )
{
return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition, false, false );
}

View File

@ -91,8 +91,7 @@
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
// convertible to size_t.
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
template <typename V,
typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&

View File

@ -795,8 +795,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
// convertible to size_t.
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
template <typename V,
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>