Adjust comments in ArrayProxy and ArrayProxyNoTemporaries tests.

This commit is contained in:
asuessenbach 2021-11-22 15:11:03 +01:00
parent f61142daf3
commit 0c311a7589
4 changed files with 105 additions and 263 deletions

View File

@ -15647,22 +15647,24 @@ int main( int argc, char ** argv )
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
# endif # endif
// Any type with a .data() return type implicitly convertible to T*, and a // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly
// .size() return type implicitly convertible to size_t. The const version // convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement.
// can capture temporaries, with lifetime ending at end of statement. template <typename V,
template<typename V, typename std::enable_if< typename std::enable_if<
std::is_convertible<decltype(std::declval<V>().data()), T*>::value std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
&& std::is_convertible<decltype(std::declval<V>().size()), std::size_t>::value>::type* = nullptr> std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxy( const V & v ) VULKAN_HPP_NOEXCEPT ArrayProxy( V const & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) ), : m_count( static_cast<uint32_t>( v.size() ) )
m_ptr( v.data() ) , m_ptr( v.data() )
{} {}
template<typename V, typename std::enable_if<
std::is_convertible<decltype(std::declval<V>().data()), T*>::value template <typename V,
&& std::is_convertible<decltype(std::declval<V>().size()), std::size_t>::value>::type* = nullptr> typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) ), : m_count( static_cast<uint32_t>( v.size() ) )
m_ptr( v.data() ) , m_ptr( v.data() )
{} {}
const T * begin() const VULKAN_HPP_NOEXCEPT const T * begin() const VULKAN_HPP_NOEXCEPT
@ -15782,14 +15784,15 @@ int main( int argc, char ** argv )
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0> template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete; ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
// Any type with a .data() return type implicitly convertible to T*, and a // Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
// .size() return type implicitly convertible to size_t. // convertible to size_t.
template<typename V, typename std::enable_if< template <typename V,
std::is_convertible<decltype(std::declval<V>().data()), T*>::value typename std::enable_if<
&& std::is_convertible<decltype(std::declval<V>().size()), std::size_t>::value>::type* = nullptr> std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) ), : m_count( static_cast<uint32_t>( v.size() ) )
m_ptr( v.data() ) , m_ptr( v.data() )
{} {}
const T * begin() const VULKAN_HPP_NOEXCEPT const T * begin() const VULKAN_HPP_NOEXCEPT

View File

@ -41,7 +41,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( ap0.size() == 0 ); assert( ap0.size() == 0 );
// Type // Type
// fct(2); // not supported: cannot convert from 'const int *' to 'T *' // fct(2); // not supported: cannot convert argument 1 from 'int' to 'vk::ArrayProxy<int>'
fctc( 1 ); fctc( 1 );
int i0 = 1; int i0 = 1;
@ -49,7 +49,7 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc( i0 ); fctc( i0 );
const int i1 = 2; const int i1 = 2;
// fct(i1); // not supported: cannot convert from 'const int *' to 'T *' // fct(i1); // not supported: cannot convert argument 1 from 'const int' to 'vk::ArrayProxy<int>'
fctc( i1 ); fctc( i1 );
// count, T * // count, T *
@ -59,7 +59,7 @@ int main( int /*argc*/, char ** /*argv*/ )
// count, T const* // count, T const*
int const * i1p = &i1; int const * i1p = &i1;
// fct({ 1, i1p }); // not supported: cannot convert from 'const int *' to 'T *' // fct({ 1, i1p }); // not supported: cannot convert argument 1 from 'initializer list' to 'vk::ArrayProxy<int>'
fctc( { 1, i1p } ); fctc( { 1, i1p } );
// std::array<T,N> // std::array<T,N>
@ -69,7 +69,7 @@ int main( int /*argc*/, char ** /*argv*/ )
// std::array<T,N> const // std::array<T,N> const
std::array<const int, 2> sa1 = { 0, 1 }; std::array<const int, 2> sa1 = { 0, 1 };
// fct(sa1); // not supported: cannot convert from '_Ty *' to 'T *' // fct(sa1); // not supported: cannot convert argument 1 from 'std::array<const int,2>' to 'vk::ArrayProxy<int>'
fctc( sa1 ); fctc( sa1 );
std::array<int, 2> const sa2 = { 1, 2 }; std::array<int, 2> const sa2 = { 1, 2 };
@ -77,14 +77,14 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc( sa2 ); fctc( sa2 );
std::array<const int, 2> const sa3 = { 1, 2 }; std::array<const int, 2> const sa3 = { 1, 2 };
// fct(sa3); // not supported: cannot convert from '_Ty *' to 'T *' // fct(sa3); // not supported: cannot convert argument 1 from 'const std::array<const int,2>' to 'vk::ArrayProxy<int>'
fctc( sa3 ); fctc( sa3 );
vk::ArrayProxy<int> ap2 = sa0; vk::ArrayProxy<int> ap2 = sa0;
assert( ap2.size() == 2 ); assert( ap2.size() == 2 );
// vk::ArrayProxy<int> ap3 = sa1; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap3 = sa1; // not supported: cannot convert from 'std::array<const int,2>' to 'vk::ArrayProxy<int>'
// vk::ArrayProxy<int> ap4 = sa2; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap4 = sa2; // not supported: cannot convert from '_Ty *' to 'T *'
// vk::ArrayProxy<int> ap5 = sa3; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap5 = sa3; // not supported: cannot convert from 'const std::array<const int,2>' to 'vk::ArrayProxy<int>'
vk::ArrayProxy<const int> ap6 = sa0; vk::ArrayProxy<const int> ap6 = sa0;
assert( ap6.size() == 2 ); assert( ap6.size() == 2 );
@ -134,7 +134,7 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc( il1 ); fctc( il1 );
std::initializer_list<const int> il2 = { 0, 1 }; std::initializer_list<const int> il2 = { 0, 1 };
// fct(il2); // not supported: cannot convert from '_Elem *' to 'T *' // fct(il2); // not supported: cannot convert argument 1 from 'std::initializer_list<T>' to 'vk::ArrayProxy<int>'
fctc( il2 ); fctc( il2 );
std::initializer_list<int> const il3 = { 0, 1 }; std::initializer_list<int> const il3 = { 0, 1 };
@ -142,13 +142,13 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc( il3 ); fctc( il3 );
std::initializer_list<const int> const il4 = { 0, 1 }; std::initializer_list<const int> const il4 = { 0, 1 };
// fct(il4); // not supported: cannot convert from 'const _Elem *' to 'T *' // fct(il4); // not supported: cannot convert argument 1 from 'const std::initializer_list<T>' to 'vk::ArrayProxy<int>'
fctc( il4 ); fctc( il4 );
// vk::ArrayProxy<int> ap14 = il1; // not supported: cannot convert from 'const _Elem *' to 'T *' // vk::ArrayProxy<int> ap14 = il1; // not supported: cannot convert from 'const _Elem *' to 'T *'
// vk::ArrayProxy<int> ap15 = il2; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap15 = il2; // not supported: cannot convert from 'std::initializer_list<T>' to 'vk::ArrayProxy<int>'
// vk::ArrayProxy<int> ap16 = il3; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap16 = il3; // not supported: cannot convert from 'const _Elem *' to 'T *'
// vk::ArrayProxy<int> ap17 = il4; // not supported: cannot convert from '_Ty *' to 'T *' // vk::ArrayProxy<int> ap17 = il4; // not supported: cannot convert from 'const std::initializer_list<T>' to 'vk::ArrayProxy<int>'
vk::ArrayProxy<const int> ap18 = il1; vk::ArrayProxy<const int> ap18 = il1;
assert( ap18.size() == 2 ); assert( ap18.size() == 2 );

View File

@ -77,19 +77,19 @@ int main( int /*argc*/, char ** /*argv*/ )
assert(ap0.size() == 0); assert(ap0.size() == 0);
// Type // Type
//fct(2); // not supported: attempting to reference a deleted function // fct(2); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<int>(int &&)
//fctc(1); // not supported: attempting to reference a deleted function // fctc(1); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<T,0>(int &&)
// getInt() // getInt()
//fct( getInt() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( T && value ) // fct( getInt() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<int>(int &&)
//fctc( getInt() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( typename std::remove_const<T>::type && value ) // fctc( getInt() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<T,0>(int &&)
int i0 = 1; int i0 = 1;
fct(i0); fct(i0);
fctc(i0); fctc(i0);
const int i1 = 2; const int i1 = 2;
//fct(i1); // not supported: cannot convert argument 1 from 'const int' to 'vk::ArrayProxyNoTemporaries<int>' // fct(i1); // not supported: ArrayProxyNoTemporaries<const int&>(const int &)
fctc(i1); fctc(i1);
// count, T * // count, T *
@ -109,31 +109,31 @@ int main( int /*argc*/, char ** /*argv*/ )
// std::array<const T,N> // std::array<const T,N>
std::array<const int, 2> sa1 = { 0, 1 }; std::array<const int, 2> sa1 = { 0, 1 };
//fct(sa1); // not supported: cannot convert argument 1 from 'std::array<const int,2>' to 'vk::ArrayProxyNoTemporaries<int>' // fct(sa1); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::array<const int,2>&>(V)
fctc(sa1); fctc(sa1);
// std::array<T,N> const // std::array<T,N> const
std::array<int, 2> const sa2 = { 1, 2 }; std::array<int, 2> const sa2 = { 1, 2 };
//fct(sa2); // not supported: cannot convert from 'const int *' to 'int *' // fct(sa2); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<int,2>&>(V)
fctc(sa2); fctc(sa2);
// std::array<const T,N> const // std::array<const T,N> const
std::array<const int, 2> const sa3 = { 1, 2 }; std::array<const int, 2> const sa3 = { 1, 2 };
//fct(sa3); // not supported: cannot convert argument 1 from 'const std::array<const int,2>' to 'vk::ArrayProxyNoTemporaries<int>' // fct(sa3); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<const int,2>&>(V)
fctc(sa3); fctc(sa3);
// getArray // getArray
//fct( getConstArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::array<T, N> const && data ) // fct( getConstArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<int,2>>(V &&)
//fctc( getConstArray() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::array<typename std::remove_const<T>::type> const && data ) // fctc( getConstArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<int,2>>(V &&)
//fct( getArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::array<T, N> && data ) // fct( getArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::array<int,2>>(V &&)
//fctc( getArray() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::array<typename std::remove_const<T>::type, N> && data ) // fctc( getArray() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::array<int,2>>(V &&)
// from std::array constructors // from std::array constructors
vk::ArrayProxyNoTemporaries<int> ap2 = sa0; vk::ArrayProxyNoTemporaries<int> ap2 = sa0;
assert(ap2.size() == 2); assert(ap2.size() == 2);
//vk::ArrayProxyNoTemporaries<int> ap3 = sa1; // not supported: cannot convert from 'std::array<const int,2>' to 'vk::ArrayProxyNoTemporaries<int>' // vk::ArrayProxyNoTemporaries<int> ap3 = sa1; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::array<const int,2>&>(V)
//vk::ArrayProxyNoTemporaries<int> ap4 = sa2; // not supported: cannot convert from 'int *' to 'int *' // vk::ArrayProxyNoTemporaries<int> ap4 = sa2; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<int,2>&>(V)
//vk::ArrayProxyNoTemporaries<int> ap5 = sa3; // not supported: cannot convert from 'const std::array<const int,2>' to 'vk::ArrayProxyNoTemporaries<int>' // vk::ArrayProxyNoTemporaries<int> ap5 = sa3; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::array<const int,2>&>(V)
vk::ArrayProxyNoTemporaries<const int> ap6 = sa0; vk::ArrayProxyNoTemporaries<const int> ap6 = sa0;
assert(ap6.size() == 2); assert(ap6.size() == 2);
@ -151,18 +151,18 @@ int main( int /*argc*/, char ** /*argv*/ )
// std::vector<T> const // std::vector<T> const
std::vector<int> const sv1 = { 0, 1 }; std::vector<int> const sv1 = { 0, 1 };
//fct(sv1); // not supported: cannot convert from 'const int *' to 'int *' // fct(sv1); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::vector<int,std::allocator<int>>&>(V)
fctc(sv1); fctc(sv1);
vk::ArrayProxyNoTemporaries<int> ap10 = sv0; vk::ArrayProxyNoTemporaries<int> ap10 = sv0;
assert(ap10.size() == 2); assert(ap10.size() == 2);
//vk::ArrayProxyNoTemporaries<int> ap11 = sv1; // not supported: cannot convert from 'int *' to 'int *' // vk::ArrayProxyNoTemporaries<int> ap11 = sv1; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::vector<int,std::allocator<int>>&>(V)
// getVector // getVector
//fct( getConstVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::vector<T, Allocator> const && data ) // fct( getConstVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::vector<int,std::allocator<int>>>(V &&)
//fctc( getConstVector() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::vector<typename std::remove_const<T>::type, Allocator> const && data ) // fctc( getConstVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::vector<int,std::allocator<int>>>(V &&)
//fct( getVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::vector<T> && data ) // fct( getVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::vector<int,std::allocator<int>>>(V &&)
//fctc( getVector() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::vector<typename std::remove_const<T>::type> && data ) // fctc( getVector() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::vector<int,std::allocator<int>>>(V &&)
vk::ArrayProxyNoTemporaries<const int> ap12 = sv0; vk::ArrayProxyNoTemporaries<const int> ap12 = sv0;
assert(ap12.size() == 2); assert(ap12.size() == 2);
@ -190,7 +190,7 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc(il1); fctc(il1);
std::initializer_list<const int> il2 = { 0, 1 }; std::initializer_list<const int> il2 = { 0, 1 };
//fct(il2); // not supported: cannot convert argument 1 from 'std::initializer_list<const int>' to 'vk::ArrayProxyNoTemporaries<int>' // fct(il2); // not supported: attempting to reference a deleted function : ArrayProxyNoTemporaries<std::initializer_list<T>&>(V)
fctc(il2); fctc(il2);
std::initializer_list<int> const il3 = { 0, 1 }; std::initializer_list<int> const il3 = { 0, 1 };
@ -198,19 +198,19 @@ int main( int /*argc*/, char ** /*argv*/ )
fctc(il3); fctc(il3);
std::initializer_list<const int> const il4 = { 0, 1 }; std::initializer_list<const int> const il4 = { 0, 1 };
//fct(il4); // not supported: cannot convert argument 1 from 'const std::initializer_list<const int>' to 'vk::ArrayProxyNoTemporaries<int>' // fct(il4); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::initializer_list<T>&>(V)
fctc(il4); fctc(il4);
// getInitializerList // getInitializerList
//fct( getConstInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::initializer_list<T> const && list ) // fct( getConstInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries(const std::initializer_list<int> &&)
//fctc( getConstInitializerList() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> const && list ) // fctc( getConstInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<T,0>(const std::initializer_list<int> &&)
//fct( getInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::initializer_list<T> && list ) // fct( getInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries(std::initializer_list<int> &&)
//fctc( getInitializerList() ); // // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) // fctc( getInitializerList() ); // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<T,0>(std::initializer_list<int> &&)
// vk::ArrayProxyNoTemporaries<int> ap14 = il1; // not supported: cannot convert from 'const int *' to 'int *' // vk::ArrayProxyNoTemporaries<int> ap14 = il1; // not supported: cannot convert from 'const int *' to 'int *'
//vk::ArrayProxyNoTemporaries<int> ap15 = il2; // not supported: cannot convert from 'std::initializer_list<const int>' to 'vk::ArrayProxyNoTemporaries<int>' // vk::ArrayProxyNoTemporaries<int> ap15 = il2; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<std::initializer_list<T>&>(V)
// vk::ArrayProxyNoTemporaries<int> ap16 = il3; // not supported: cannot convert from 'const int *' to 'int *' // vk::ArrayProxyNoTemporaries<int> ap16 = il3; // not supported: cannot convert from 'const int *' to 'int *'
//vk::ArrayProxyNoTemporaries<int> ap17 = il4; // not supported: cannot convert from 'const std::initializer_list<const int>' to 'vk::ArrayProxyNoTemporaries<int>' // vk::ArrayProxyNoTemporaries<int> ap17 = il4; // not supported: attempting to reference a deleted function: ArrayProxyNoTemporaries<const std::initializer_list<T>&>(V)
vk::ArrayProxyNoTemporaries<const int> ap18 = il1; vk::ArrayProxyNoTemporaries<const int> ap18 = il1;
assert(ap18.size() == 2); assert(ap18.size() == 2);

View File

@ -308,88 +308,26 @@ namespace VULKAN_HPP_NAMESPACE
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
# endif # endif
template <size_t N> // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly
ArrayProxy( std::array<T, N> const & data ) VULKAN_HPP_NOEXCEPT // convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement.
: m_count( N ) template <typename V,
, m_ptr( data.data() ) typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxy( const V & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) )
, m_ptr( v.data() )
{} {}
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0> template <typename V,
ArrayProxy( std::array<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT typename std::enable_if<
: m_count( N ) std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
, m_ptr( data.data() ) std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) )
, m_ptr( v.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() )
{}
# if defined( VULKAN_HPP_SUPPORT_SPAN )
template <size_t N = std::dynamic_extent>
ArrayProxy( std::span<T, N> const & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent,
typename B = T,
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxy( std::span<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent>
ArrayProxy( std::span<T, N> & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent,
typename B = T,
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxy( std::span<typename std::remove_const<T>::type, N> & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
# endif
const T * begin() const VULKAN_HPP_NOEXCEPT const T * begin() const VULKAN_HPP_NOEXCEPT
{ {
return m_ptr; return m_ptr;
@ -451,7 +389,8 @@ namespace VULKAN_HPP_NAMESPACE
, m_ptr( &value ) , m_ptr( &value )
{} {}
ArrayProxyNoTemporaries( T && value ) = delete; template <typename V>
ArrayProxyNoTemporaries( V && value ) = delete;
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0> template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT ArrayProxyNoTemporaries( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT
@ -506,117 +445,17 @@ namespace VULKAN_HPP_NAMESPACE
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0> template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete; ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
template <size_t N> // Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
ArrayProxyNoTemporaries( std::array<T, N> const & data ) VULKAN_HPP_NOEXCEPT // convertible to size_t.
: m_count( N ) template <typename V,
, m_ptr( data.data() ) typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( v.size() ) )
, m_ptr( v.data() )
{} {}
template <size_t N>
ArrayProxyNoTemporaries( std::array<T, N> const && data ) = delete;
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( 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, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::array<typename std::remove_const<T>::type, N> const && data ) = delete;
template <size_t N>
ArrayProxyNoTemporaries( std::array<T, N> & data ) VULKAN_HPP_NOEXCEPT
: m_count( N )
, m_ptr( data.data() )
{}
template <size_t N>
ArrayProxyNoTemporaries( std::array<T, N> && data ) = delete;
template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::array<typename std::remove_const<T>::type, 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>
ArrayProxyNoTemporaries( std::array<typename std::remove_const<T>::type, N> && data ) = delete;
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
ArrayProxyNoTemporaries( 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>>
ArrayProxyNoTemporaries( std::vector<T, Allocator> const && data ) = delete;
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>
ArrayProxyNoTemporaries( 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>,
typename B = T,
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::vector<typename std::remove_const<T>::type, Allocator> const && data ) = delete;
template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
ArrayProxyNoTemporaries( 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>>
ArrayProxyNoTemporaries( std::vector<T, Allocator> && data ) = delete;
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>
ArrayProxyNoTemporaries( 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() )
{}
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>
ArrayProxyNoTemporaries( std::vector<typename std::remove_const<T>::type, Allocator> && data ) = delete;
# if defined( VULKAN_HPP_SUPPORT_SPAN )
template <size_t N = std::dynamic_extent>
ArrayProxyNoTemporaries( std::span<T, N> const & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent,
typename B = T,
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::span<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent>
ArrayProxyNoTemporaries( std::span<T, N> & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
template <size_t N = std::dynamic_extent,
typename B = T,
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::span<typename std::remove_const<T>::type, N> & data ) VULKAN_HPP_NOEXCEPT
: m_count( static_cast<uint32_t>( data.size() ) )
, m_ptr( data.data() )
{}
# endif
const T * begin() const VULKAN_HPP_NOEXCEPT const T * begin() const VULKAN_HPP_NOEXCEPT
{ {
return m_ptr; return m_ptr;