From 65e895dfb662c3fd87e37628358f3bd955eb4b5f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 24 Aug 2017 10:45:12 +0200 Subject: compat/util: use std::decay for overload resolution --- compat/util.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compat') diff --git a/compat/util.hpp b/compat/util.hpp index 59c270ed..5a7ccd86 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -46,7 +46,7 @@ inline auto clamp_float(n val, n min, n max) return std::fmin(std::fmax(val, min), max); } -template +template struct clamp final { static inline auto clamp_(const n& val, const n& min, const n& max) @@ -59,8 +59,8 @@ struct clamp final } }; -template<> -struct clamp +template +struct clamp { static inline auto clamp_(float val, float min, float max) { @@ -68,8 +68,8 @@ struct clamp } }; -template<> -struct clamp +template +struct clamp { static inline auto clamp_(double val, double min, double max) { @@ -83,5 +83,5 @@ template inline auto clamp(const t& val, const u& min, const w& max) { using tp = decltype(val + min + max); - return ::util_detail::clamp::clamp_(val, min, max); + return ::util_detail::clamp, tp>::clamp_(val, min, max); } -- cgit v1.2.3