BAN: implement basic swap

This will be improved, currently just works on general type T and
moves values between arguments.
This commit is contained in:
2023-12-07 09:26:17 +02:00
parent efd8be8207
commit a872efdef2
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include <BAN/Move.h>
namespace BAN
{
template<typename T>
void swap(T& lhs, T& rhs)
{
T tmp = move(lhs);
lhs = move(rhs);
rhs = move(tmp);
}
}