From 73f518ca987a213ace044c37ab3b3b65fd5fc198 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Thu, 8 Sep 2022 20:42:17 +0100 Subject: [PATCH] Disambiguation from other max/min functions Disambiguation from other max/min functions --- include/xlnt/utils/numeric.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xlnt/utils/numeric.hpp b/include/xlnt/utils/numeric.hpp index ed1eee830..901291338 100644 --- a/include/xlnt/utils/numeric.hpp +++ b/include/xlnt/utils/numeric.hpp @@ -51,7 +51,7 @@ constexpr Number abs(Number val) /// constexpr max /// template -constexpr typename std::common_type::type max(NumberL lval, NumberR rval) +constexpr typename std::common_type::type (max)(NumberL lval, NumberR rval) { return (lval < rval) ? rval : lval; } @@ -60,7 +60,7 @@ constexpr typename std::common_type::type max(NumberL lval, Nu /// constexpr min /// template -constexpr typename std::common_type::type min(NumberL lval, NumberR rval) +constexpr typename std::common_type::type (min)(NumberL lval, NumberR rval) { return (lval < rval) ? lval : rval; }