Add const versions of StructureChain::get

This commit is contained in:
Mike Barriault 2020-03-02 21:32:06 +00:00
parent f43626d8a1
commit 4f56a424c6
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> const ClassType& get() const VULKAN_HPP_NOEXCEPT { return static_cast<const ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get()
{
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>
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> const ClassType& get() const VULKAN_HPP_NOEXCEPT { return static_cast<const ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA&, ClassTypeB&, ClassTypes&...> get()
{
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>
void unlink() VULKAN_HPP_NOEXCEPT
{