summaryrefslogtreecommitdiff
path: root/asl/utility.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-03 12:13:34 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-03 12:13:34 +0100
commit46944ec98688e962e94dcfcf426215f252bf2a87 (patch)
tree1fb08cbc3cd3dedfe8940dbebe8eb1bf5089ac21 /asl/utility.hpp
parentc2d4216695b48dfe6bf7083c11e0a7fcbb671e2e (diff)
Start work on status
Diffstat (limited to 'asl/utility.hpp')
-rw-r--r--asl/utility.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/asl/utility.hpp b/asl/utility.hpp
index 2877447..69838e5 100644
--- a/asl/utility.hpp
+++ b/asl/utility.hpp
@@ -11,6 +11,14 @@
namespace asl
{
+template<moveable T>
+constexpr void swap(T& a, T& b)
+{
+ T tmp{ASL_MOVE(a)};
+ a = ASL_MOVE(b);
+ b = ASL_MOVE(tmp);
+}
+
template<typename T, typename U>
T exchange(T& obj, U&& new_value)
{