mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-23 12:40:05 +00:00
Introduce default template type for functions StructureChain::get<T,Which>
allows auto root = structureChain.get(); instead of auto root = structureChain.get<RootStructure>();
This commit is contained in:
parent
2ccc36b26b
commit
80fa34bfb5
@ -10750,13 +10750,13 @@ int main( int argc, char ** argv )
|
||||
|
||||
StructureChain & operator=( StructureChain && rhs ) = delete;
|
||||
|
||||
template <typename T, size_t Which = 0>
|
||||
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
|
||||
T & get() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>( static_cast<std::tuple<ChainElements...>&>( *this ) );
|
||||
}
|
||||
|
||||
template <typename T, size_t Which = 0>
|
||||
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
|
||||
T const & get() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>( static_cast<std::tuple<ChainElements...>&>( *this ) );
|
||||
|
@ -970,14 +970,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
|
||||
StructureChain & operator=( StructureChain && rhs ) = delete;
|
||||
|
||||
template <typename T, size_t Which = 0>
|
||||
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
|
||||
T & get() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>(
|
||||
static_cast<std::tuple<ChainElements...> &>( *this ) );
|
||||
}
|
||||
|
||||
template <typename T, size_t Which = 0>
|
||||
template <typename T = typename std::tuple_element<0, std::tuple<ChainElements...>>::type, size_t Which = 0>
|
||||
T const & get() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>(
|
||||
|
Loading…
Reference in New Issue
Block a user