Update StructureChain.hpp

This commit is contained in:
Andreas Süßenbach 2023-06-21 09:17:06 +02:00 committed by GitHub
parent 397ffad84a
commit 50c537eb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,6 +127,17 @@
return std::tie( get<T0>(), get<T1>(), get<Ts>()... ); return std::tie( get<T0>(), get<T1>(), get<Ts>()... );
} }
// assign a complete structure to the StructureChain without modifying the chaining
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT
{
T & lhs = get<T, Which>();
void * pNext = lhs.pNext;
lhs = rhs;
lhs.pNext = pNext;
return *this;
}
template <typename ClassType, size_t Which = 0> template <typename ClassType, size_t Which = 0>
typename std::enable_if< typename std::enable_if<
std::is_same<ClassType, typename std::tuple_element<0, std::tuple<ChainElements...>>::type>::value && std::is_same<ClassType, typename std::tuple_element<0, std::tuple<ChainElements...>>::type>::value &&