mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-23 04:30:05 +00:00
109 lines
3.1 KiB
C++
109 lines
3.1 KiB
C++
// <tuple> includes <sys/sysmacros.h> through some other header
|
|
// this results in major(x) being resolved to gnu_dev_major(x)
|
|
// which is an expression in a constructor initializer list.
|
|
#if defined( major )
|
|
# undef major
|
|
#endif
|
|
#if defined( minor )
|
|
# undef minor
|
|
#endif
|
|
|
|
// Windows defines MemoryBarrier which is deprecated and collides
|
|
// with the VULKAN_HPP_NAMESPACE::MemoryBarrier struct.
|
|
#if defined( MemoryBarrier )
|
|
# undef MemoryBarrier
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS )
|
|
# if defined( __clang__ )
|
|
# if __has_feature( cxx_unrestricted_unions )
|
|
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
|
# endif
|
|
# elif defined( __GNUC__ )
|
|
# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ )
|
|
# if 40600 <= GCC_VERSION
|
|
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
|
# endif
|
|
# elif defined( _MSC_VER )
|
|
# if 1900 <= _MSC_VER
|
|
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_INLINE )
|
|
# if defined( __clang__ )
|
|
# if __has_attribute( always_inline )
|
|
# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
|
|
# else
|
|
# define VULKAN_HPP_INLINE inline
|
|
# endif
|
|
# elif defined( __GNUC__ )
|
|
# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
|
|
# elif defined( _MSC_VER )
|
|
# define VULKAN_HPP_INLINE inline
|
|
# else
|
|
# define VULKAN_HPP_INLINE inline
|
|
# endif
|
|
#endif
|
|
|
|
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
|
|
# define VULKAN_HPP_TYPESAFE_EXPLICIT
|
|
#else
|
|
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
|
|
#endif
|
|
|
|
#if defined( __cpp_constexpr )
|
|
# define VULKAN_HPP_CONSTEXPR constexpr
|
|
# if __cpp_constexpr >= 201304
|
|
# define VULKAN_HPP_CONSTEXPR_14 constexpr
|
|
# else
|
|
# define VULKAN_HPP_CONSTEXPR_14
|
|
# endif
|
|
# define VULKAN_HPP_CONST_OR_CONSTEXPR constexpr
|
|
#else
|
|
# define VULKAN_HPP_CONSTEXPR
|
|
# define VULKAN_HPP_CONSTEXPR_14
|
|
# define VULKAN_HPP_CONST_OR_CONSTEXPR const
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_NOEXCEPT )
|
|
# if defined( _MSC_VER ) && ( _MSC_VER <= 1800 )
|
|
# define VULKAN_HPP_NOEXCEPT
|
|
# else
|
|
# define VULKAN_HPP_NOEXCEPT noexcept
|
|
# define VULKAN_HPP_HAS_NOEXCEPT 1
|
|
# if defined( VULKAN_HPP_NO_EXCEPTIONS )
|
|
# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept
|
|
# else
|
|
# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#if 14 <= VULKAN_HPP_CPP_VERSION
|
|
# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
|
|
#else
|
|
# define VULKAN_HPP_DEPRECATED( msg )
|
|
#endif
|
|
|
|
#if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS )
|
|
# define VULKAN_HPP_NODISCARD [[nodiscard]]
|
|
# if defined( VULKAN_HPP_NO_EXCEPTIONS )
|
|
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS [[nodiscard]]
|
|
# else
|
|
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
|
|
# endif
|
|
#else
|
|
# define VULKAN_HPP_NODISCARD
|
|
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
|
|
#endif
|
|
|
|
#if !defined( VULKAN_HPP_NAMESPACE )
|
|
# define VULKAN_HPP_NAMESPACE vk
|
|
#endif
|
|
|
|
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
|
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
|
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|