Fix C++20 module build with -DVULKAN_HPP_NO_SMART_HANDLE (#1678)

* Move SharedHandle and UniqueHandle under correct preprocessor guard in .cppm

* Fix VulkanHppGenerator
This commit is contained in:
Anton Shangareev 2023-10-09 14:25:01 +04:00 committed by GitHub
parent 18e912955e
commit b961a1a4c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -5426,9 +5426,10 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
auto const hardCodedTypes = std::array{ "ArrayWrapper1D", "ArrayWrapper2D", "FlagTraits", "Flags", "DispatchLoaderBase", "DispatchLoaderDynamic" }; auto const hardCodedTypes = std::array{ "ArrayWrapper1D", "ArrayWrapper2D", "FlagTraits", "Flags", "DispatchLoaderBase", "DispatchLoaderDynamic" };
auto const hardCodedEnhancedModeTypes = auto const hardCodedEnhancedModeTypes =
std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain", "UniqueHandle", "SharedHandle" }; std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain" };
auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree", auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree",
"ObjectDestroyShared", "ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared" }; "ObjectDestroyShared", "ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared",
"SharedHandle", "UniqueHandle"};
auto usings = std::string{ R"( //===================================== auto usings = std::string{ R"( //=====================================
//=== HARDCODED TYPEs AND FUNCTIONs === //=== HARDCODED TYPEs AND FUNCTIONs ===

View File

@ -45,10 +45,8 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::ArrayProxy; using VULKAN_HPP_NAMESPACE::ArrayProxy;
using VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries; using VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries;
using VULKAN_HPP_NAMESPACE::Optional; using VULKAN_HPP_NAMESPACE::Optional;
using VULKAN_HPP_NAMESPACE::SharedHandle;
using VULKAN_HPP_NAMESPACE::StridedArrayProxy; using VULKAN_HPP_NAMESPACE::StridedArrayProxy;
using VULKAN_HPP_NAMESPACE::StructureChain; using VULKAN_HPP_NAMESPACE::StructureChain;
using VULKAN_HPP_NAMESPACE::UniqueHandle;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if !defined( VULKAN_HPP_NO_SMART_HANDLE ) #if !defined( VULKAN_HPP_NO_SMART_HANDLE )
@ -60,6 +58,8 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::ObjectReleaseShared; using VULKAN_HPP_NAMESPACE::ObjectReleaseShared;
using VULKAN_HPP_NAMESPACE::PoolFree; using VULKAN_HPP_NAMESPACE::PoolFree;
using VULKAN_HPP_NAMESPACE::PoolFreeShared; using VULKAN_HPP_NAMESPACE::PoolFreeShared;
using VULKAN_HPP_NAMESPACE::SharedHandle;
using VULKAN_HPP_NAMESPACE::UniqueHandle;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
//================== //==================