Disabled vk::raii::exchange() implementation for C++14 or newer (#1803)

* Disabled `vk::raii::exchange()` implementation for C++14 or newer. Replaced with `using std::exchange`

* Regenerated raii headers
This commit is contained in:
Nikolai Siukosev 2024-02-15 11:35:02 +04:00 committed by GitHub
parent 982afd2929
commit f1a38ff729
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -578,17 +578,17 @@ namespace VULKAN_HPP_NAMESPACE
{
namespace VULKAN_HPP_RAII_NAMESPACE
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
using std::exchange;
# else
template <class T, class U = T>
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
return std::exchange<T>( obj, std::forward<U>( newValue ) );
# else
T oldValue = std::move( obj );
obj = std::forward<U>( newValue );
return oldValue;
# endif
}
# endif
template <class T>
class CreateReturnType

View File

@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE
{
namespace VULKAN_HPP_RAII_NAMESPACE
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
using std::exchange;
# else
template <class T, class U = T>
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
return std::exchange<T>( obj, std::forward<U>( newValue ) );
# else
T oldValue = std::move( obj );
obj = std::forward<U>( newValue );
return oldValue;
# endif
}
# endif
template <class T>
class CreateReturnType

View File

@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE
{
namespace VULKAN_HPP_RAII_NAMESPACE
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
using std::exchange;
# else
template <class T, class U = T>
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
{
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
return std::exchange<T>( obj, std::forward<U>( newValue ) );
# else
T oldValue = std::move( obj );
obj = std::forward<U>( newValue );
return oldValue;
# endif
}
# endif
template <class T>
class CreateReturnType