mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-10 04:18:48 -04:00
Make the vk::to_string functions constexpr with C++20 and above. (#2101)
This commit is contained in:
parent
538fa5d529
commit
b19b7d7afb
@ -2577,7 +2577,7 @@ std::string VulkanHppGenerator::generateBitmaskToString( std::map<std::string, B
|
|||||||
if ( toStringChecks.empty() )
|
if ( toStringChecks.empty() )
|
||||||
{
|
{
|
||||||
static const std::string bitmaskToStringTemplate = R"(
|
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}";
|
return "${emptyValue}";
|
||||||
}
|
}
|
||||||
@ -7355,7 +7355,7 @@ ${cases} default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::string enumToStringTemplate = R"(
|
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}
|
${functionBody}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user