mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
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:
parent
982afd2929
commit
f1a38ff729
@ -578,17 +578,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
namespace VULKAN_HPP_RAII_NAMESPACE
|
namespace VULKAN_HPP_RAII_NAMESPACE
|
||||||
{
|
{
|
||||||
|
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
|
||||||
|
using std::exchange;
|
||||||
|
# else
|
||||||
template <class T, class U = T>
|
template <class T, class U = T>
|
||||||
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
|
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 );
|
T oldValue = std::move( obj );
|
||||||
obj = std::forward<U>( newValue );
|
obj = std::forward<U>( newValue );
|
||||||
return oldValue;
|
return oldValue;
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class CreateReturnType
|
class CreateReturnType
|
||||||
|
@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
namespace VULKAN_HPP_RAII_NAMESPACE
|
namespace VULKAN_HPP_RAII_NAMESPACE
|
||||||
{
|
{
|
||||||
|
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
|
||||||
|
using std::exchange;
|
||||||
|
# else
|
||||||
template <class T, class U = T>
|
template <class T, class U = T>
|
||||||
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
|
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 );
|
T oldValue = std::move( obj );
|
||||||
obj = std::forward<U>( newValue );
|
obj = std::forward<U>( newValue );
|
||||||
return oldValue;
|
return oldValue;
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class CreateReturnType
|
class CreateReturnType
|
||||||
|
@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
namespace VULKAN_HPP_RAII_NAMESPACE
|
namespace VULKAN_HPP_RAII_NAMESPACE
|
||||||
{
|
{
|
||||||
|
# if ( 14 <= VULKAN_HPP_CPP_VERSION )
|
||||||
|
using std::exchange;
|
||||||
|
# else
|
||||||
template <class T, class U = T>
|
template <class T, class U = T>
|
||||||
VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue )
|
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 );
|
T oldValue = std::move( obj );
|
||||||
obj = std::forward<U>( newValue );
|
obj = std::forward<U>( newValue );
|
||||||
return oldValue;
|
return oldValue;
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class CreateReturnType
|
class CreateReturnType
|
||||||
|
Loading…
Reference in New Issue
Block a user