Merge pull request #755 from mtavenrath/clang10

Fix clang 10 related compile time issues
This commit is contained in:
Andreas Süßenbach
2020-09-30 09:15:30 +02:00
committed by GitHub
2 changed files with 37 additions and 34 deletions

View File

@@ -780,37 +780,37 @@ namespace VULKAN_HPP_NAMESPACE
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator<( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags > bit;
return flags.operator>( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator<=( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags >= bit;
return flags.operator>=( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator>( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags < bit;
return flags.operator<( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator>=( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags <= bit;
return flags.operator<=( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator==( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags == bit;
return flags.operator==( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR bool operator!=( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags != bit;
return flags.operator!=( bit );
}
#endif
@@ -818,19 +818,19 @@ namespace VULKAN_HPP_NAMESPACE
template <typename BitType>
VULKAN_HPP_CONSTEXPR Flags<BitType> operator&( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags & bit;
return flags.operator&( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR Flags<BitType> operator|( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags | bit;
return flags.operator|( bit );
}
template <typename BitType>
VULKAN_HPP_CONSTEXPR Flags<BitType> operator^( BitType bit, Flags<BitType> const & flags ) VULKAN_HPP_NOEXCEPT
{
return flags ^ bit;
return flags.operator^( bit );
}
template <typename RefType>
@@ -964,13 +964,15 @@ namespace VULKAN_HPP_NAMESPACE
template <typename T, size_t Which = 0>
T & get() VULKAN_HPP_NOEXCEPT
{
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>( *this );
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>(
static_cast<std::tuple<ChainElements...> &>( *this ) );
}
template <typename T, size_t Which = 0>
T const & get() const VULKAN_HPP_NOEXCEPT
{
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>( *this );
return std::get<ChainElementIndex<0, T, Which, void, ChainElements...>::value>(
static_cast<std::tuple<ChainElements...> &>( *this ) );
}
template <typename T0, typename T1, typename... Ts>
@@ -997,7 +999,7 @@ namespace VULKAN_HPP_NAMESPACE
auto pNext = reinterpret_cast<VkBaseInStructure *>( &get<ClassType, Which>() );
VULKAN_HPP_ASSERT( !isLinked( pNext ) );
auto & headElement = std::get<0>( *this );
auto & headElement = std::get<0>( static_cast<std::tuple<ChainElements...> &>( *this ) );
pNext->pNext = reinterpret_cast<VkBaseInStructure const *>( headElement.pNext );
headElement.pNext = pNext;
}
@@ -1050,7 +1052,8 @@ namespace VULKAN_HPP_NAMESPACE
bool isLinked( VkBaseInStructure const * pNext )
{
VkBaseInStructure const * elementPtr = reinterpret_cast<VkBaseInStructure const *>( &std::get<0>( *this ) );
VkBaseInStructure const * elementPtr = reinterpret_cast<VkBaseInStructure const *>(
&std::get<0>( static_cast<std::tuple<ChainElements...> &>( *this ) ) );
while ( elementPtr )
{
if ( elementPtr->pNext == pNext )
@@ -1065,8 +1068,8 @@ namespace VULKAN_HPP_NAMESPACE
template <size_t Index>
typename std::enable_if<Index != 0, void>::type link() VULKAN_HPP_NOEXCEPT
{
auto & x = std::get<Index - 1>( *this );
x.pNext = &std::get<Index>( *this );
auto & x = std::get<Index - 1>( static_cast<std::tuple<ChainElements...> &>( *this ) );
x.pNext = &std::get<Index>( static_cast<std::tuple<ChainElements...> &>( *this ) );
link<Index - 1>();
}
@@ -1077,7 +1080,7 @@ namespace VULKAN_HPP_NAMESPACE
template <size_t Index>
typename std::enable_if<Index != 0, void>::type unlink( VkBaseOutStructure const * pNext ) VULKAN_HPP_NOEXCEPT
{
auto & element = std::get<Index>( *this );
auto & element = std::get<Index>( static_cast<std::tuple<ChainElements...> &>( *this ) );
if ( element.pNext == pNext )
{
element.pNext = pNext->pNext;
@@ -1091,7 +1094,7 @@ namespace VULKAN_HPP_NAMESPACE
template <size_t Index>
typename std::enable_if<Index == 0, void>::type unlink( VkBaseOutStructure const * pNext ) VULKAN_HPP_NOEXCEPT
{
auto & element = std::get<0>( *this );
auto & element = std::get<0>( static_cast<std::tuple<ChainElements...> &>( *this ) );
if ( element.pNext == pNext )
{
element.pNext = pNext->pNext;