diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 8ed36bc..6a30c4b 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -578,17 +578,17 @@ namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE { +# if ( 14 <= VULKAN_HPP_CPP_VERSION ) + using std::exchange; +# else template VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue ) { -# if ( 14 <= VULKAN_HPP_CPP_VERSION ) - return std::exchange( obj, std::forward( newValue ) ); -# else T oldValue = std::move( obj ); obj = std::forward( newValue ); return oldValue; -# endif } +# endif template class CreateReturnType diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index 52236e8..b55878b 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE { +# if ( 14 <= VULKAN_HPP_CPP_VERSION ) + using std::exchange; +# else template VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue ) { -# if ( 14 <= VULKAN_HPP_CPP_VERSION ) - return std::exchange( obj, std::forward( newValue ) ); -# else T oldValue = std::move( obj ); obj = std::forward( newValue ); return oldValue; -# endif } +# endif template class CreateReturnType diff --git a/vulkan/vulkansc_raii.hpp b/vulkan/vulkansc_raii.hpp index cc50b93..27645ff 100644 --- a/vulkan/vulkansc_raii.hpp +++ b/vulkan/vulkansc_raii.hpp @@ -17,17 +17,17 @@ namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE { +# if ( 14 <= VULKAN_HPP_CPP_VERSION ) + using std::exchange; +# else template VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue ) { -# if ( 14 <= VULKAN_HPP_CPP_VERSION ) - return std::exchange( obj, std::forward( newValue ) ); -# else T oldValue = std::move( obj ); obj = std::forward( newValue ); return oldValue; -# endif } +# endif template class CreateReturnType