mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
12 lines
298 B
C++
12 lines
298 B
C++
|
#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 )
|
||
|
{
|
||
|
T oldValue = std::move( obj );
|
||
|
obj = std::forward<U>( newValue );
|
||
|
return oldValue;
|
||
|
}
|
||
|
#endif
|