diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 950a4b7..ab40f7a 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -6772,16 +6772,52 @@ int main( int argc, char ** argv ) , m_ptr(list.begin()) {} - template - ArrayProxy(Container const& container) VULKAN_HPP_NOEXCEPT - : m_count(static_cast(container.size())) - , m_ptr(container.data()) + template + ArrayProxy(std::array const & data) VULKAN_HPP_NOEXCEPT + : m_count(N) + , m_ptr(data.data()) {} - template - ArrayProxy(Container & container) VULKAN_HPP_NOEXCEPT - : m_count(static_cast(container.size())) - , m_ptr(container.data()) + template ::value, int>::type = 0> + ArrayProxy(std::array::type, N> const & data) VULKAN_HPP_NOEXCEPT + : m_count(N) + , m_ptr(data.data()) + {} + + template + ArrayProxy(std::array & data) VULKAN_HPP_NOEXCEPT + : m_count(N) + , m_ptr(data.data()) + {} + + template ::value, int>::type = 0> + ArrayProxy(std::array::type, N> & data) VULKAN_HPP_NOEXCEPT + : m_count(N) + , m_ptr(data.data()) + {} + + template ::type>> + ArrayProxy(std::vector const & data) VULKAN_HPP_NOEXCEPT + : m_count(static_cast(data.size())) + , m_ptr(data.data()) + {} + + template ::type>, typename B = T, typename std::enable_if::value, int>::type = 0> + ArrayProxy(std::vector::type, Allocator> const& data) VULKAN_HPP_NOEXCEPT + : m_count(static_cast(data.size())) + , m_ptr(data.data()) + {} + + template ::type>> + ArrayProxy(std::vector & data) VULKAN_HPP_NOEXCEPT + : m_count(static_cast(data.size())) + , m_ptr(data.data()) + {} + + template ::type>, typename B = T, typename std::enable_if::value, int>::type = 0> + ArrayProxy(std::vector::type, Allocator> & data) VULKAN_HPP_NOEXCEPT + : m_count(static_cast(data.size())) + , m_ptr(data.data()) {} const T * begin() const VULKAN_HPP_NOEXCEPT diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 27b3326..17ac8c9 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -246,16 +246,56 @@ namespace VULKAN_HPP_NAMESPACE , m_ptr( list.begin() ) {} - template - ArrayProxy( Container const & container ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( container.size() ) ) - , m_ptr( container.data() ) + template + ArrayProxy( std::array const & data ) VULKAN_HPP_NOEXCEPT + : m_count( N ) + , m_ptr( data.data() ) {} - template - ArrayProxy( Container & container ) VULKAN_HPP_NOEXCEPT - : m_count( static_cast( container.size() ) ) - , m_ptr( container.data() ) + template ::value, int>::type = 0> + ArrayProxy( std::array::type, N> const & data ) VULKAN_HPP_NOEXCEPT + : m_count( N ) + , m_ptr( data.data() ) + {} + + template + ArrayProxy( std::array & data ) VULKAN_HPP_NOEXCEPT + : m_count( N ) + , m_ptr( data.data() ) + {} + + template ::value, int>::type = 0> + ArrayProxy( std::array::type, N> & data ) VULKAN_HPP_NOEXCEPT + : m_count( N ) + , m_ptr( data.data() ) + {} + + template ::type>> + ArrayProxy( std::vector const & data ) VULKAN_HPP_NOEXCEPT + : m_count( static_cast( data.size() ) ) + , m_ptr( data.data() ) + {} + + template ::type>, + typename B = T, + typename std::enable_if::value, int>::type = 0> + ArrayProxy( std::vector::type, Allocator> const & data ) VULKAN_HPP_NOEXCEPT + : m_count( static_cast( data.size() ) ) + , m_ptr( data.data() ) + {} + + template ::type>> + ArrayProxy( std::vector & data ) VULKAN_HPP_NOEXCEPT + : m_count( static_cast( data.size() ) ) + , m_ptr( data.data() ) + {} + + template ::type>, + typename B = T, + typename std::enable_if::value, int>::type = 0> + ArrayProxy( std::vector::type, Allocator> & data ) VULKAN_HPP_NOEXCEPT + : m_count( static_cast( data.size() ) ) + , m_ptr( data.data() ) {} const T * begin() const VULKAN_HPP_NOEXCEPT