mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-22 20:30:04 +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
|