aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/vulkan/vulkan_handles.hpp
diff options
context:
space:
mode:
authorJon Leech <[email protected]>2024-12-19 21:42:01 -0800
committerJon Leech <[email protected]>2024-12-19 21:43:52 -0800
commitd4a196d8c84e032d27f999adcea3075517c1c97f (patch)
treec6903fd6fcbd653f5782f63a05e4618d7b0665ff /include/vulkan/vulkan_handles.hpp
parent6a74a7d65cafa19e38ec116651436cce6efd5b2e (diff)
downloadVulkan-Headers-d4a196d8c84e032d27f999adcea3075517c1c97f.tar.gz
Vulkan-Headers-d4a196d8c84e032d27f999adcea3075517c1c97f.zip
Update for Vulkan-Docs 1.4.304HEADv1.4.304main
Diffstat (limited to 'include/vulkan/vulkan_handles.hpp')
-rw-r--r--include/vulkan/vulkan_handles.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/vulkan/vulkan_handles.hpp b/include/vulkan/vulkan_handles.hpp
index 617126a..304e9ed 100644
--- a/include/vulkan/vulkan_handles.hpp
+++ b/include/vulkan/vulkan_handles.hpp
@@ -17706,5 +17706,55 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD typename ResultValueType<uint32_t>::type enumerateInstanceVersion( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT );
#endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */
+ // operators to compare vk::-handles
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ auto operator<=>( T const & lhs, T const & rhs )
+ {
+ return static_cast<typename T::NativeType>( lhs ) <=> static_cast<typename T::NativeType>( rhs );
+ }
+#else
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator==( T const & lhs, T const & rhs )
+ {
+ return static_cast<typename T::NativeType>( lhs ) == static_cast<typename T::NativeType>( rhs );
+ }
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator!=( T const & lhs, T const & rhs )
+ {
+ return static_cast<typename T::NativeType>( lhs ) != static_cast<typename T::NativeType>( rhs );
+ }
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator<( T const & lhs, T const & rhs )
+ {
+ return static_cast<typename T::NativeType>( lhs ) < static_cast<typename T::NativeType>( rhs );
+ }
+#endif
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator==( T const & v, std::nullptr_t )
+ {
+ return !v;
+ }
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator==( std::nullptr_t, T const & v )
+ {
+ return !v;
+ }
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator!=( T const & v, std::nullptr_t )
+ {
+ return !!v;
+ }
+
+ template <typename T, typename std::enable_if<VULKAN_HPP_NAMESPACE::isVulkanHandleType<T>::value, int>::type = 0>
+ bool operator!=( std::nullptr_t, T const & v )
+ {
+ return !!v;
+ }
} // namespace VULKAN_HPP_NAMESPACE
#endif