From 7b43ea1b100c9d66de19f1a725cd190c550c008f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 19 Dec 2014 20:41:28 -0800 Subject: [PATCH] Added swap. --- include/bx/bx.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/bx/bx.h b/include/bx/bx.h index 9ab131a..bd6093a 100644 --- a/include/bx/bx.h +++ b/include/bx/bx.h @@ -38,6 +38,12 @@ namespace bx } #define BX_IGNORE_C4127(_x) bx::ignoreC4127(!!(_x) ) + template + inline void swap(Ty& _a, Ty& _b) + { + Ty tmp = _a; _a = _b; _b = tmp; + } + } // namespace bx // Annoying C++0x stuff..