This will be improved, currently just works on general type T and moves values between arguments.
17 lines
171 B
C++
17 lines
171 B
C++
#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);
|
|
}
|
|
|
|
}
|