diff -r 248fba6d1e76 -r 7fc34735178e sources/basics.h --- a/sources/basics.h Wed Jan 27 12:38:00 2021 +0200 +++ b/sources/basics.h Wed Jan 27 13:02:51 2021 +0200 @@ -29,6 +29,7 @@ */ #pragma once +#include #include #if !defined(_MSC_VER) && !defined(__cdecl) @@ -106,8 +107,8 @@ return result; } -template -T clamp (T a, T b, T c) +template +std::common_type_t clamp(T a, TT b, TTT c) { return (a < b) ? b : (a > c) ? c : a; }