mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #755 from mtavenrath/clang10
Fix clang 10 related compile time issues
This commit is contained in:
commit
5fd780c189
@ -9459,37 +9459,37 @@ int main( int argc, char ** argv )
|
||||
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
|
||||
|
||||
@ -9497,19 +9497,19 @@ int main( int argc, char ** argv )
|
||||
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 );
|
||||
}
|
||||
)";
|
||||
|
||||
@ -9757,13 +9757,13 @@ int main( int argc, char ** argv )
|
||||
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>
|
||||
@ -9789,7 +9789,7 @@ int main( int argc, char ** argv )
|
||||
|
||||
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;
|
||||
}
|
||||
@ -9840,7 +9840,7 @@ int main( int argc, char ** argv )
|
||||
|
||||
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 )
|
||||
@ -9855,8 +9855,8 @@ int main( int argc, char ** argv )
|
||||
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>();
|
||||
}
|
||||
|
||||
@ -9867,7 +9867,7 @@ int main( int argc, char ** argv )
|
||||
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;
|
||||
@ -9881,7 +9881,7 @@ int main( int argc, char ** argv )
|
||||
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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user