From 50c537eb9190c0f2b552de0630c070b18ada3ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Wed, 21 Jun 2023 09:17:06 +0200 Subject: [PATCH] Update StructureChain.hpp --- snippets/StructureChain.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/snippets/StructureChain.hpp b/snippets/StructureChain.hpp index f21ef99..5b5e467 100644 --- a/snippets/StructureChain.hpp +++ b/snippets/StructureChain.hpp @@ -127,6 +127,17 @@ return std::tie( get(), get(), get()... ); } + // assign a complete structure to the StructureChain without modifying the chaining + template >::type, size_t Which = 0> + StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT + { + T & lhs = get(); + void * pNext = lhs.pNext; + lhs = rhs; + lhs.pNext = pNext; + return *this; + } + template typename std::enable_if< std::is_same>::type>::value &&