Merge pull request #530 from mbarriault/master

Add const versions of StructureChain::get
This commit is contained in:
Andreas Süßenbach 2020-03-03 08:56:56 +01:00 committed by GitHub
commit 8983df9269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -5897,12 +5897,20 @@ int main(int argc, char **argv)
template<typename ClassType> ClassType& get() VULKAN_HPP_NOEXCEPT { return static_cast<ClassType&>(*this);} template<typename ClassType> ClassType& get() VULKAN_HPP_NOEXCEPT { return static_cast<ClassType&>(*this);}
template<typename ClassType> const ClassType& get() const VULKAN_HPP_NOEXCEPT { return static_cast<const ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes> template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get() std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get()
{ {
return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...); return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...);
} }
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<const ClassTypeA&, const ClassTypeB&, ClassTypes&...> get() const
{
return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...);
}
template<typename ClassType> template<typename ClassType>
void unlink() VULKAN_HPP_NOEXCEPT void unlink() VULKAN_HPP_NOEXCEPT
{ {

View File

@ -538,12 +538,20 @@ namespace VULKAN_HPP_NAMESPACE
template<typename ClassType> ClassType& get() VULKAN_HPP_NOEXCEPT { return static_cast<ClassType&>(*this);} template<typename ClassType> ClassType& get() VULKAN_HPP_NOEXCEPT { return static_cast<ClassType&>(*this);}
template<typename ClassType> const ClassType& get() const VULKAN_HPP_NOEXCEPT { return static_cast<const ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes> template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get() std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get()
{ {
return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...); return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...);
} }
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<const ClassTypeA&, const ClassTypeB&, const ClassTypes&...> get() const
{
return std::tie(get<ClassTypeA>(), get<ClassTypeB>(), get<ClassTypes>()...);
}
template<typename ClassType> template<typename ClassType>
void unlink() VULKAN_HPP_NOEXCEPT void unlink() VULKAN_HPP_NOEXCEPT
{ {