From c812c92d1a1835f0bda783e709481188c8d92225 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 15 Mar 2014 19:34:59 -0700 Subject: Clean up header organization --- src/compat/alg.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/compat/alg.hpp (limited to 'src/compat/alg.hpp') diff --git a/src/compat/alg.hpp b/src/compat/alg.hpp new file mode 100644 index 0000000..250c161 --- /dev/null +++ b/src/compat/alg.hpp @@ -0,0 +1,21 @@ +#ifndef TMWA_COMPAT_ALG_HPP +#define TMWA_COMPAT_ALG_HPP + +# include "../sanity.hpp" + +# include + + +template +typename std::common_type::type min(A a, B b) +{ + return a < b ? a : b; +} + +template +typename std::common_type::type max(A a, B b) +{ + return b < a ? a : b; +} + +#endif // TMWA_COMPAT_ALG_HPP -- cgit v1.2.3-70-g09d2