diff --git a/README.md b/README.md index e323ca5..0283bf7 100644 --- a/README.md +++ b/README.md @@ -652,16 +652,6 @@ With this define you can specify whether the ```DispatchLoaderDynamic``` is impo With this define you can include a reflection mechanism on the vk-structures. It adds a function ```reflect``` that returns a tuple-version of the structure. That tuple then could easily be iterated. But at least for now, that feature takes lots of compile-time resources, so currently it is recommended to enable that feature only if you're willing to pay that price. -## Deprecated elements - -There are a couple of elements in vulkan.hpp that are marked as deprecated (with C++14 and above): - -The implicit cast operators on ```vk::ResultValue``` are potentially wrong under certain circumstances. You should access the value explicitly as the member of the ```vk::ResultValue``` instead - -The type traits ```cpp_type``` are replaced by the more general type traits ```CppType```. - -All those elements will be removed around November 2021. - ## See Also Feel free to submit a PR to add to this list. diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 1b95153..c0cfe3a 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -5019,23 +5019,6 @@ std::string VulkanHppGenerator::generateDispatchLoaderStaticCommands( std::vecto return addTitleAndProtection( title, str ); } -std::string VulkanHppGenerator::generateEnhancedReturnType( CommandData const & commandData, size_t returnParam, bool isStructureChain ) const -{ - assert( ( returnParam == INVALID_INDEX ) || ( returnParam < commandData.params.size() ) ); - - std::string enhancedReturnType; - assert( returnParam != INVALID_INDEX ); - // if there is a return parameter, we think returnType is always "void" or "VkResult" - // -> we can return that parameter - assert( ( commandData.returnType == "void" ) || ( commandData.returnType == "VkResult" ) ); - assert( commandData.successCodes.empty() || ( commandData.successCodes[0] == "VK_SUCCESS" ) ); - return ( commandData.params[returnParam].type.type == "void" ) ? "std::vector" // the return parameter is a vector-type parameter - : isStructureChain ? "std::vector" // for structureChain returns, it's just - // a vector of StrutureChains - : "std::vector<" + stripPrefix( commandData.params[returnParam].type.type, "Vk" ) + - ",Allocator>"; // for the other parameters, we use a vector of the pure type -} - std::string VulkanHppGenerator::generateEnum( std::pair const & enumData ) const { std::string bitmask; @@ -16505,32 +16488,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h T value; operator std::tuple() VULKAN_HPP_NOEXCEPT { return std::tuple(result, value); } - -#if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST) - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator T const & () const & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator T& () & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator T const && () const && VULKAN_HPP_NOEXCEPT - { - return std::move( value ); - } - - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator T&& () && VULKAN_HPP_NOEXCEPT - { - return std::move( value ); - } -#endif }; #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) @@ -16551,20 +16508,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h return std::make_tuple( result, std::move( value ) ); } -# if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST) - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator UniqueHandle& () & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") - operator UniqueHandle() VULKAN_HPP_NOEXCEPT - { - return std::move(value); - } -# endif - Result result; UniqueHandle value; }; @@ -16588,15 +16531,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h Result result; std::vector> value; - -# if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST) - VULKAN_HPP_DEPRECATED( - "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator std::tuple> &>() VULKAN_HPP_NOEXCEPT - { - return std::tuple> &>( result, value ); - } -# endif }; #endif diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 423fcfe..9bae735 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -635,7 +635,6 @@ private: std::string generateDispatchLoaderStaticCommands( std::vector const & requireData, std::set & listedCommands, std::string const & title ) const; - std::string generateEnhancedReturnType( CommandData const & commandData, size_t returnParam, bool isStructureChain ) const; std::string generateEnum( std::pair const & enumData ) const; std::string generateEnums( std::vector const & requireData, std::set & listedEnums, std::string const & title ) const; std::string generateEnumInitializer( TypeInfo const & type, diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 0e6dde9..f56676d 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -5885,32 +5885,6 @@ namespace VULKAN_HPP_NAMESPACE { return std::tuple( result, value ); } - -#if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator T const &() const & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator T &() & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator T const &&() const && VULKAN_HPP_NOEXCEPT - { - return std::move( value ); - } - - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator T &&() && VULKAN_HPP_NOEXCEPT - { - return std::move( value ); - } -#endif }; #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) @@ -5932,20 +5906,6 @@ namespace VULKAN_HPP_NAMESPACE return std::make_tuple( result, std::move( value ) ); } -# if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator UniqueHandle &() & VULKAN_HPP_NOEXCEPT - { - return value; - } - - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator UniqueHandle() VULKAN_HPP_NOEXCEPT - { - return std::move( value ); - } -# endif - Result result; UniqueHandle value; }; @@ -5970,14 +5930,6 @@ namespace VULKAN_HPP_NAMESPACE Result result; std::vector> value; - -# if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) - VULKAN_HPP_DEPRECATED( "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) - operator std::tuple> &>() VULKAN_HPP_NOEXCEPT - { - return std::tuple> &>( result, value ); - } -# endif }; #endif