mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #819 from asuessenbach/StructureChain
Add missing const-qualifier in the static_cast in function T const & StructureChain::getFeatures2() const.
This commit is contained in:
commit
96ff36d382
@ -10435,7 +10435,7 @@ int main( int argc, char ** argv )
|
||||
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 ) );
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>( static_cast<std::tuple<ChainElements...> const &>( *this ) );
|
||||
}
|
||||
|
||||
template <typename T0, typename T1, typename... Ts>
|
||||
|
@ -55,7 +55,9 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
||||
// some valid StructureChains
|
||||
vk::StructureChain<vk::PhysicalDeviceProperties2> sc0;
|
||||
vk::StructureChain<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceIDProperties> sc1;
|
||||
const vk::StructureChain<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceIDProperties> sc1;
|
||||
auto pdp = sc1.get<vk::PhysicalDeviceProperties2>();
|
||||
unused( pdp );
|
||||
vk::StructureChain<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceMaintenance3Properties> sc2;
|
||||
vk::StructureChain<vk::PhysicalDeviceProperties2, vk::PhysicalDevicePushDescriptorPropertiesKHR> sc3;
|
||||
vk::StructureChain<vk::PhysicalDeviceProperties2,
|
||||
|
@ -978,7 +978,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
T const & get() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>(
|
||||
static_cast<std::tuple<ChainElements...> &>( *this ) );
|
||||
static_cast<std::tuple<ChainElements...> const &>( *this ) );
|
||||
}
|
||||
|
||||
template <typename T0, typename T1, typename... Ts>
|
||||
|
Loading…
Reference in New Issue
Block a user