From d3a3c6321f0efc617cec916a5b6e1e71a77a99b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Fri, 18 Jul 2025 08:58:15 +0200 Subject: [PATCH] Extend error check on exports of a required command being in the api list of a feature (#2221) --- VulkanHppGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 64aabb3..4acf4c7 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -14795,7 +14795,8 @@ void VulkanHppGenerator::readFeatureRequire( tinyxml2::XMLElement const * elemen checkForError( ( std::stoi( m_version ) < 319 ) || !commandIt->second.exports.empty(), commandIt->second.xmlLine, "command <" + commandIt->first + "> is required by feature <" + featureData.name + "> but is not marked as exported" ); - checkForError( std::ranges::includes( featureData.api, commandIt->second.exports ), + checkForError( std::ranges::any_of( commandIt->second.exports, + [&featureData]( auto const & api ) { return std::ranges::find( featureData.api, api ) != featureData.api.end(); } ), commandIt->second.xmlLine, "command <" + commandIt->first + "> is required by feature <" + featureData.name + "> but is not exported for the feature's api" ); }