Change return of StructureChain::get() from tuple of values to tuple of references (#495)

Resolves #494
This commit is contained in:
Andreas Süßenbach
2020-01-29 10:00:41 +01:00
committed by GitHub
parent b6a190f4a2
commit bca5adc12d
2 changed files with 4 additions and 10 deletions

View File

@@ -533,12 +533,9 @@ namespace VULKAN_HPP_NAMESPACE
template<typename ClassType> ClassType& get() VULKAN_HPP_NOEXCEPT { return static_cast<ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA, ClassTypeB, ClassTypes...> get()
std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get()
{
return std::tuple_cat(
std::make_tuple(get<ClassTypeA>(),get<ClassTypeB>()),
std::make_tuple(get<ClassTypes>()...)
);
return std::forward_as_tuple(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...);
}
template<typename ClassType>