mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add structurechain tuple-based getter (#292)
This commit is contained in:
parent
f0dc8d6f38
commit
a08954c470
@ -4549,6 +4549,15 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
|
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
|
||||||
|
|
||||||
|
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
|
||||||
|
std::tuple<ClassTypeA, ClassTypeB, ClassTypes...> get()
|
||||||
|
{
|
||||||
|
return std::tuple_cat(
|
||||||
|
std::make_tuple(get<ClassTypeA>(),get<ClassTypeB>()),
|
||||||
|
std::make_tuple(get<ClassTypes>()...)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename List, typename X>
|
template<typename List, typename X>
|
||||||
void link()
|
void link()
|
||||||
|
Loading…
Reference in New Issue
Block a user