Remove move-constructor and deleted move-assignment of vk::StructureChain. (#1949)

This commit is contained in:
Andreas Süßenbach 2024-08-26 09:45:57 +02:00 committed by GitHub
parent 1069a086a6
commit ecd4b59328
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 33 deletions

View File

@ -50,6 +50,8 @@
template <typename... ChainElements>
class StructureChain : public std::tuple<ChainElements...>
{
// Note: StructureChain has no move constructor or move assignment operator, as it is not supposed to contain movable containers.
// In order to get a copy-operation on a move-operations, those functions are neither deleted nor defaulted.
public:
StructureChain() VULKAN_HPP_NOEXCEPT
{
@ -66,15 +68,6 @@
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( std::forward<std::tuple<ChainElements...>>( rhs ) )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
link( &std::get<0>( *this ),
&std::get<0>( rhs ),
reinterpret_cast<VkBaseOutStructure *>( &std::get<0>( *this ) ),
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( elems... )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
@ -91,8 +84,6 @@
return *this;
}
StructureChain & operator=( StructureChain && rhs ) = delete;
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
T & get() VULKAN_HPP_NOEXCEPT
{

View File

@ -608,6 +608,8 @@ namespace VULKAN_HPP_NAMESPACE
template <typename... ChainElements>
class StructureChain : public std::tuple<ChainElements...>
{
// Note: StructureChain has no move constructor or move assignment operator, as it is not supposed to contain movable containers.
// In order to get a copy-operation on a move-operations, those functions are neither deleted nor defaulted.
public:
StructureChain() VULKAN_HPP_NOEXCEPT
{
@ -624,15 +626,6 @@ namespace VULKAN_HPP_NAMESPACE
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( std::forward<std::tuple<ChainElements...>>( rhs ) )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
link( &std::get<0>( *this ),
&std::get<0>( rhs ),
reinterpret_cast<VkBaseOutStructure *>( &std::get<0>( *this ) ),
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( elems... )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
@ -649,8 +642,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
StructureChain & operator=( StructureChain && rhs ) = delete;
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
T & get() VULKAN_HPP_NOEXCEPT
{

View File

@ -608,6 +608,8 @@ namespace VULKAN_HPP_NAMESPACE
template <typename... ChainElements>
class StructureChain : public std::tuple<ChainElements...>
{
// Note: StructureChain has no move constructor or move assignment operator, as it is not supposed to contain movable containers.
// In order to get a copy-operation on a move-operations, those functions are neither deleted nor defaulted.
public:
StructureChain() VULKAN_HPP_NOEXCEPT
{
@ -624,15 +626,6 @@ namespace VULKAN_HPP_NAMESPACE
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( std::forward<std::tuple<ChainElements...>>( rhs ) )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
link( &std::get<0>( *this ),
&std::get<0>( rhs ),
reinterpret_cast<VkBaseOutStructure *>( &std::get<0>( *this ) ),
reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( rhs ) ) );
}
StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( elems... )
{
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
@ -649,8 +642,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
StructureChain & operator=( StructureChain && rhs ) = delete;
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
T & get() VULKAN_HPP_NOEXCEPT
{