From ecd4b593282f78be16938c9172e4a35bbc112839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 26 Aug 2024 09:45:57 +0200 Subject: [PATCH] Remove move-constructor and deleted move-assignment of vk::StructureChain. (#1949) --- snippets/StructureChain.hpp | 13 ++----------- vulkan/vulkan.hpp | 13 ++----------- vulkan/vulkansc.hpp | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/snippets/StructureChain.hpp b/snippets/StructureChain.hpp index 62065ba..dff3b43 100644 --- a/snippets/StructureChain.hpp +++ b/snippets/StructureChain.hpp @@ -50,6 +50,8 @@ template class StructureChain : public std::tuple { + // 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( &std::get<0>( rhs ) ) ); } - StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( std::forward>( rhs ) ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - } - StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple( elems... ) { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); @@ -91,8 +84,6 @@ return *this; } - StructureChain & operator=( StructureChain && rhs ) = delete; - template >::type, size_t Which = 0> T & get() VULKAN_HPP_NOEXCEPT { diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 9d487ac..f9afa3f 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -608,6 +608,8 @@ namespace VULKAN_HPP_NAMESPACE template class StructureChain : public std::tuple { + // 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( &std::get<0>( rhs ) ) ); } - StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( std::forward>( rhs ) ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - } - StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple( elems... ) { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); @@ -649,8 +642,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } - StructureChain & operator=( StructureChain && rhs ) = delete; - template >::type, size_t Which = 0> T & get() VULKAN_HPP_NOEXCEPT { diff --git a/vulkan/vulkansc.hpp b/vulkan/vulkansc.hpp index ddce914..4d86680 100644 --- a/vulkan/vulkansc.hpp +++ b/vulkan/vulkansc.hpp @@ -608,6 +608,8 @@ namespace VULKAN_HPP_NAMESPACE template class StructureChain : public std::tuple { + // 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( &std::get<0>( rhs ) ) ); } - StructureChain( StructureChain && rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( std::forward>( rhs ) ) - { - static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); - link( &std::get<0>( *this ), - &std::get<0>( rhs ), - reinterpret_cast( &std::get<0>( *this ) ), - reinterpret_cast( &std::get<0>( rhs ) ) ); - } - StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple( elems... ) { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); @@ -649,8 +642,6 @@ namespace VULKAN_HPP_NAMESPACE return *this; } - StructureChain & operator=( StructureChain && rhs ) = delete; - template >::type, size_t Which = 0> T & get() VULKAN_HPP_NOEXCEPT {