mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-09 22:20:07 +00:00
Merge pull request #1298 from asuessenbach/deprecated
Remove deprecated implicit-cast operators on vk::ResultValue.
This commit is contained in:
commit
d715006717
10
README.md
10
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<ObjectType::eObjectTypeID>``` are replaced by the more general type traits ```CppType<Type, Type::eTypeID>```.
|
||||
|
||||
All those elements will be removed around November 2021.
|
||||
|
||||
## See Also
|
||||
|
||||
Feel free to submit a PR to add to this list.
|
||||
|
@ -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<uint8_t,Allocator>" // the return parameter is a vector-type parameter
|
||||
: isStructureChain ? "std::vector<StructureChain,Allocator>" // 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<std::string, EnumData> const & enumData ) const
|
||||
{
|
||||
std::string bitmask;
|
||||
@ -16505,32 +16488,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
|
||||
T value;
|
||||
|
||||
operator std::tuple<Result&, T&>() VULKAN_HPP_NOEXCEPT { return std::tuple<Result&, T&>(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<Type, Dispatch>& () & 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<Type, Dispatch>() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::move(value);
|
||||
}
|
||||
# endif
|
||||
|
||||
Result result;
|
||||
UniqueHandle<Type, Dispatch> value;
|
||||
};
|
||||
@ -16588,15 +16531,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
|
||||
|
||||
Result result;
|
||||
std::vector<UniqueHandle<Type, Dispatch>> 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<Result &, std::vector<UniqueHandle<Type, Dispatch>> &>() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::tuple<Result &, std::vector<UniqueHandle<Type, Dispatch>> &>( result, value );
|
||||
}
|
||||
# endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -635,7 +635,6 @@ private:
|
||||
std::string generateDispatchLoaderStaticCommands( std::vector<RequireData> const & requireData,
|
||||
std::set<std::string> & listedCommands,
|
||||
std::string const & title ) const;
|
||||
std::string generateEnhancedReturnType( CommandData const & commandData, size_t returnParam, bool isStructureChain ) const;
|
||||
std::string generateEnum( std::pair<std::string, EnumData> const & enumData ) const;
|
||||
std::string generateEnums( std::vector<RequireData> const & requireData, std::set<std::string> & listedEnums, std::string const & title ) const;
|
||||
std::string generateEnumInitializer( TypeInfo const & type,
|
||||
|
@ -5885,32 +5885,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
return std::tuple<Result &, T &>( 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<Type, Dispatch> &() & 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<Type, Dispatch>() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::move( value );
|
||||
}
|
||||
# endif
|
||||
|
||||
Result result;
|
||||
UniqueHandle<Type, Dispatch> value;
|
||||
};
|
||||
@ -5970,14 +5930,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
|
||||
Result result;
|
||||
std::vector<UniqueHandle<Type, Dispatch>> 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<Result &, std::vector<UniqueHandle<Type, Dispatch>> &>() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::tuple<Result &, std::vector<UniqueHandle<Type, Dispatch>> &>( result, value );
|
||||
}
|
||||
# endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user