mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-10 06:30:08 +00:00
Reintroduce ArrayProxy constructors with std::array and std::vector
This commit is contained in:
parent
f56e99e5b8
commit
f15f2f382b
@ -6772,16 +6772,52 @@ int main( int argc, char ** argv )
|
||||
, m_ptr(list.begin())
|
||||
{}
|
||||
|
||||
template <typename Container>
|
||||
ArrayProxy(Container const& container) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(container.size()))
|
||||
, m_ptr(container.data())
|
||||
template <size_t N>
|
||||
ArrayProxy(std::array<T, N> const & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(N)
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <typename Container>
|
||||
ArrayProxy(Container & container) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(container.size()))
|
||||
, m_ptr(container.data())
|
||||
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy(std::array<typename std::remove_const<T>::type, N> const & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(N)
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <size_t N>
|
||||
ArrayProxy(std::array<T, N> & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(N)
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy(std::array<typename std::remove_const<T>::type, N> & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(N)
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
|
||||
ArrayProxy(std::vector<T, Allocator> const & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(data.size()))
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> const& data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(data.size()))
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
|
||||
ArrayProxy(std::vector<T, Allocator> & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(data.size()))
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> & data) VULKAN_HPP_NOEXCEPT
|
||||
: m_count(static_cast<uint32_t>(data.size()))
|
||||
, m_ptr(data.data())
|
||||
{}
|
||||
|
||||
const T * begin() const VULKAN_HPP_NOEXCEPT
|
||||
|
@ -246,16 +246,56 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
, m_ptr( list.begin() )
|
||||
{}
|
||||
|
||||
template <typename Container>
|
||||
ArrayProxy( Container const & container ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( container.size() ) )
|
||||
, m_ptr( container.data() )
|
||||
template <size_t N>
|
||||
ArrayProxy( std::array<T, N> const & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( N )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <typename Container>
|
||||
ArrayProxy( Container & container ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( container.size() ) )
|
||||
, m_ptr( container.data() )
|
||||
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy( std::array<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( N )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <size_t N>
|
||||
ArrayProxy( std::array<T, N> & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( N )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy( std::array<typename std::remove_const<T>::type, N> & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( N )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
|
||||
ArrayProxy( std::vector<T, Allocator> const & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( data.size() ) )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>,
|
||||
typename B = T,
|
||||
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy( std::vector<typename std::remove_const<T>::type, Allocator> const & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( data.size() ) )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
|
||||
ArrayProxy( std::vector<T, Allocator> & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( data.size() ) )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
template <class Allocator = std::allocator<typename std::remove_const<T>::type>,
|
||||
typename B = T,
|
||||
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||
ArrayProxy( std::vector<typename std::remove_const<T>::type, Allocator> & data ) VULKAN_HPP_NOEXCEPT
|
||||
: m_count( static_cast<uint32_t>( data.size() ) )
|
||||
, m_ptr( data.data() )
|
||||
{}
|
||||
|
||||
const T * begin() const VULKAN_HPP_NOEXCEPT
|
||||
|
Loading…
Reference in New Issue
Block a user