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,19 +4013,16 @@ std::string
if ( returnParams.empty() ) if ( returnParams.empty() )
{ {
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandData.params ); std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandData.params );
if ( vectorParams.empty() ) if ( vectorParams.empty() && determineConstPointerParams( commandData.params ).empty() )
{ {
if ( determineConstPointerParams( commandData.params ).empty() ) return generateCommandSetStandard( generateCommandStandard( name, commandData, initialSkipCount, definition ) );
{ }
return generateCommandSetStandard( generateCommandStandard( name, commandData, initialSkipCount, definition ) ); else if ( vectorParams.size() <= 1 )
} {
else return generateCommandSetStandardEnhanced(
{ definition,
return generateCommandSetStandardEnhanced( generateCommandStandard( name, commandData, initialSkipCount, definition ),
definition, generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false, false ) );
generateCommandStandard( name, commandData, initialSkipCount, definition ),
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false, false ) );
}
} }
} }
return ""; return "";
@ -7110,7 +7107,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandValue( std::map<std::st
if ( returnParams.empty() ) if ( returnParams.empty() )
{ {
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandIt->second.params ); 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 ); 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> 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; 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 // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
// convertible to size_t.
template <typename V, template <typename V,
typename std::enable_if< typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value && 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> 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; 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 // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
// convertible to size_t.
template <typename V, template <typename V,
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value && 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> std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>