Extend operator==() and operator<=>() on structures to compare null-terminated string members

This commit is contained in:
asuessenbach
2022-01-05 09:46:33 +01:00
parent a5070c4094
commit eecfe9bf42
5 changed files with 640 additions and 197 deletions

View File

@@ -83,6 +83,10 @@ int main( int /*argc*/, char ** /*argv*/ )
auto h1 = std::hash<vk::ApplicationInfo>{}( appInfo1 );
auto h2 = std::hash<vk::ApplicationInfo>{}( appInfo2 );
assert( h1 == h2 );
assert( appInfo1 == appInfo2 );
# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
assert( appInfo1 <= appInfo2 );
# endif
}
{
@@ -97,6 +101,10 @@ int main( int /*argc*/, char ** /*argv*/ )
auto h1 = std::hash<vk::InstanceCreateInfo>{}( info1 );
auto h2 = std::hash<vk::InstanceCreateInfo>{}( info2 );
assert( h1 == h2 );
assert( info1 == info2 );
# if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
assert( info1 <= info2 );
# endif
}
#endif
}