diff options
Diffstat (limited to 'include/vulkan/vulkan.hpp')
-rw-r--r-- | include/vulkan/vulkan.hpp | 94 |
1 files changed, 50 insertions, 44 deletions
diff --git a/include/vulkan/vulkan.hpp b/include/vulkan/vulkan.hpp index f456a7a..1edbcd5 100644 --- a/include/vulkan/vulkan.hpp +++ b/include/vulkan/vulkan.hpp @@ -56,7 +56,7 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h # include <span> #endif -static_assert( VK_HEADER_VERSION == 281, "Wrong VK_HEADER_VERSION!" ); +static_assert( VK_HEADER_VERSION == 282, "Wrong VK_HEADER_VERSION!" ); // <tuple> includes <sys/sysmacros.h> through some other header // this results in major(x) being resolved to gnu_dev_major(x) @@ -6602,11 +6602,6 @@ namespace VULKAN_HPP_NAMESPACE #endif template <typename T> - void ignore( T const & ) VULKAN_HPP_NOEXCEPT - { - } - - template <typename T> struct ResultValue { #ifdef VULKAN_HPP_HAS_NOEXCEPT @@ -6718,65 +6713,76 @@ namespace VULKAN_HPP_NAMESPACE #endif }; - VULKAN_HPP_INLINE typename ResultValueType<void>::type createResultValueType( Result result ) + namespace detail { + template <typename T> + void ignore( T const & ) VULKAN_HPP_NOEXCEPT + { + } + + VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<void>::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result ) + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - return result; + return result; #else - ignore( result ); + VULKAN_HPP_NAMESPACE::detail::ignore( result ); #endif - } + } - template <typename T> - VULKAN_HPP_INLINE typename ResultValueType<T>::type createResultValueType( Result result, T & data ) - { + template <typename T> + VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<T>::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result, T & data ) + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - return ResultValue<T>( result, data ); + return ResultValue<T>( result, data ); #else - ignore( result ); - return data; + VULKAN_HPP_NAMESPACE::detail::ignore( result ); + return data; #endif - } + } - template <typename T> - VULKAN_HPP_INLINE typename ResultValueType<T>::type createResultValueType( Result result, T && data ) - { + template <typename T> + VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType<T>::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result, T && data ) + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - return ResultValue<T>( result, std::move( data ) ); + return ResultValue<T>( result, std::move( data ) ); #else - ignore( result ); - return std::move( data ); + VULKAN_HPP_NAMESPACE::detail::ignore( result ); + return std::move( data ); #endif - } + } + } // namespace detail - VULKAN_HPP_INLINE void resultCheck( Result result, char const * message ) + namespace detail { + VULKAN_HPP_INLINE void resultCheck( Result result, char const * message ) + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - ignore( message ); - VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); + VULKAN_HPP_NAMESPACE::detail::ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty + VULKAN_HPP_NAMESPACE::detail::ignore( message ); + VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); #else - if ( result != Result::eSuccess ) - { - detail::throwResultException( result, message ); - } + if ( result != Result::eSuccess ) + { + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, message ); + } #endif - } + } - VULKAN_HPP_INLINE void resultCheck( Result result, char const * message, std::initializer_list<Result> successCodes ) - { + VULKAN_HPP_INLINE void resultCheck( Result result, char const * message, std::initializer_list<Result> successCodes ) + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - ignore( message ); - ignore( successCodes ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty - VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); + VULKAN_HPP_NAMESPACE::detail::ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty + VULKAN_HPP_NAMESPACE::detail::ignore( message ); + VULKAN_HPP_NAMESPACE::detail::ignore( successCodes ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty + VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); #else - if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) - { - detail::throwResultException( result, message ); - } + if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) + { + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, message ); + } #endif - } + } + } // namespace detail //=========================== //=== CONSTEXPR CONSTANTs === |