Introduce struct hash<vk::Flags<BitType>>
Allows the use of any vk::*Flags type as the key in a std::unordered_map
This commit is contained in:
@@ -13263,6 +13263,16 @@ namespace std
|
||||
//=== HASH structures ===
|
||||
//=======================
|
||||
|
||||
template <typename BitType>
|
||||
struct hash<VULKAN_HPP_NAMESPACE::Flags<BitType>>
|
||||
{
|
||||
std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags<BitType> const & flags ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::hash<typename std::underlying_type<BitType>::type>{}(
|
||||
static_cast<typename std::underlying_type<BitType>::type>( flags ) );
|
||||
}
|
||||
};
|
||||
|
||||
//=== VK_VERSION_1_0 ===
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user