mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #530 from mbarriault/master
Add const versions of StructureChain::get
This commit is contained in:
commit
8983df9269
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user