Make the vk::to_string functions constexpr with C++20 and above. (#2101)

This commit is contained in:
Andreas Süßenbach 2025-03-13 13:44:44 +01:00 committed by GitHub
parent 538fa5d529
commit b19b7d7afb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 398 additions and 398 deletions

View File

@ -2577,7 +2577,7 @@ std::string VulkanHppGenerator::generateBitmaskToString( std::map<std::string, B
if ( toStringChecks.empty() )
{
static const std::string bitmaskToStringTemplate = R"(
VULKAN_HPP_INLINE std::string to_string( ${bitmaskName} )
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string to_string( ${bitmaskName} )
{
return "${emptyValue}";
}
@ -7355,7 +7355,7 @@ ${cases} default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString(
}
const std::string enumToStringTemplate = R"(
VULKAN_HPP_INLINE std::string to_string( ${enumName}${argument} )
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string to_string( ${enumName}${argument} )
{
${functionBody}
}

File diff suppressed because it is too large Load Diff