MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ArrayProxy

Class ArrayProxy

SDKs/vulkan/vulkan/vulkan.hpp:593–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
592 template <typename T>
593 class ArrayProxy
594 {
595 public:
596 VULKAN_HPP_CONSTEXPR ArrayProxy() VULKAN_HPP_NOEXCEPT
597 : m_count( 0 )
598 , m_ptr( nullptr )
599 {
600 }
601
602 VULKAN_HPP_CONSTEXPR ArrayProxy( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
603 : m_count( 0 )
604 , m_ptr( nullptr )
605 {
606 }
607
608 ArrayProxy( T const & value ) VULKAN_HPP_NOEXCEPT
609 : m_count( 1 )
610 , m_ptr( &value )
611 {
612 }
613
614 ArrayProxy( uint32_t count, T const * ptr ) VULKAN_HPP_NOEXCEPT
615 : m_count( count )
616 , m_ptr( ptr )
617 {
618 }
619
620 template <std::size_t C>
621 ArrayProxy( T const ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
622 : m_count( C )
623 , m_ptr( ptr )
624 {
625 }
626
627# if __GNUC__ >= 9
628# pragma GCC diagnostic push
629# pragma GCC diagnostic ignored "-Winit-list-lifetime"
630# endif
631
632 ArrayProxy( std::initializer_list<T> const & list ) VULKAN_HPP_NOEXCEPT
633 : m_count( static_cast<uint32_t>( list.size() ) )
634 , m_ptr( list.begin() )
635 {
636 }
637
638 template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
639 ArrayProxy( std::initializer_list<typename std::remove_const<T>::type> const & list ) VULKAN_HPP_NOEXCEPT
640 : m_count( static_cast<uint32_t>( list.size() ) )
641 , m_ptr( list.begin() )
642 {
643 }
644
645# if __GNUC__ >= 9
646# pragma GCC diagnostic pop
647# endif
648
649 // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly
650 // convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement.

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected