Added static_assert for better error if from_string is called with an invalid type.

This commit is contained in:
Patrick 2023-12-09 00:03:26 +01:00
parent 6317aa1eaf
commit 9e01cfa511

View File

@ -4401,7 +4401,10 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_STORAGE_API extern const EnumFromStringMap enumFromStringMap;
template <typename TEnum>
std::optional<TEnum> from_string( const std::string & );
std::optional<TEnum> from_string( const std::string & )
{
static_assert(false, "Not a Vulkan enum type.");
}
//=== VK_VERSION_1_0 ===