From d8e4354f228661ec4dbc3f46627553c6f941309f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 24 Aug 2017 12:26:36 +1000 Subject: [PATCH] maths: only enable util::limit for scalar types this reduces conflicts with the coord limit operation. --- maths.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maths.hpp b/maths.hpp index 9e8e9f35..475666ea 100644 --- a/maths.hpp +++ b/maths.hpp @@ -628,7 +628,10 @@ namespace util { // min/max clamping template constexpr - T + std::enable_if_t< + std::is_scalar_v && std::is_scalar_v && std::is_scalar_v, + std::common_type_t + > limit (const T val, const U lo, const V hi) { assert (lo <= hi);