Include <memory> in vulkan_raii.hpp to have std::unique_ptr available. (#1762)

This commit is contained in:
Andreas Süßenbach 2024-01-03 11:49:10 +01:00 committed by GitHub
parent 52666b03f5
commit d2f13e2f7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 5 deletions

View File

@ -586,6 +586,7 @@ void VulkanHppGenerator::generateRAIIHppFile() const
#ifndef VULKAN_RAII_HPP #ifndef VULKAN_RAII_HPP
#define VULKAN_RAII_HPP #define VULKAN_RAII_HPP
#include <memory> // std::unique_ptr
#include <utility> // std::exchange, std::forward #include <utility> // std::exchange, std::forward
#include <vulkan/${api}.hpp> #include <vulkan/${api}.hpp>

View File

@ -16302,9 +16302,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
# elif defined( __APPLE__ ) # elif defined( __APPLE__ )
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
if (m_library == nullptr) if ( m_library == nullptr )
{ {
m_library = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL); m_library = dlopen( "libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL );
} }
# elif defined( _WIN32 ) # elif defined( _WIN32 )
m_library = ::LoadLibraryA( "vulkan-1.dll" ); m_library = ::LoadLibraryA( "vulkan-1.dll" );

View File

@ -8,6 +8,7 @@
#ifndef VULKAN_RAII_HPP #ifndef VULKAN_RAII_HPP
#define VULKAN_RAII_HPP #define VULKAN_RAII_HPP
#include <memory> // std::unique_ptr
#include <utility> // std::exchange, std::forward #include <utility> // std::exchange, std::forward
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
@ -35,7 +36,7 @@ namespace VULKAN_HPP_NAMESPACE
# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS )
using Type = VULKAN_HPP_EXPECTED<T, VULKAN_HPP_NAMESPACE::Result>; using Type = VULKAN_HPP_EXPECTED<T, VULKAN_HPP_NAMESPACE::Result>;
# else # else
using Type = T; using Type = T;
# endif # endif
}; };

View File

@ -6990,9 +6990,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
# elif defined( __APPLE__ ) # elif defined( __APPLE__ )
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
if (m_library == nullptr) if ( m_library == nullptr )
{ {
m_library = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL); m_library = dlopen( "libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL );
} }
# elif defined( _WIN32 ) # elif defined( _WIN32 )
m_library = ::LoadLibraryA( "vulkan-1.dll" ); m_library = ::LoadLibraryA( "vulkan-1.dll" );

View File

@ -8,6 +8,7 @@
#ifndef VULKAN_RAII_HPP #ifndef VULKAN_RAII_HPP
#define VULKAN_RAII_HPP #define VULKAN_RAII_HPP
#include <memory> // std::unique_ptr
#include <utility> // std::exchange, std::forward #include <utility> // std::exchange, std::forward
#include <vulkan/vulkansc.hpp> #include <vulkan/vulkansc.hpp>