From 46944ec98688e962e94dcfcf426215f252bf2a87 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Fri, 3 Jan 2025 12:13:34 +0100 Subject: Start work on status --- asl/utility.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'asl/utility.hpp') 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 +constexpr void swap(T& a, T& b) +{ + T tmp{ASL_MOVE(a)}; + a = ASL_MOVE(b); + b = ASL_MOVE(tmp); +} + template T exchange(T& obj, U&& new_value) { -- cgit