Skip to content

Commit

Permalink
Merge pull request #667 from Teebonne/patch-7
Browse files Browse the repository at this point in the history
Disambiguation from other max/min functions
  • Loading branch information
tfussell authored Dec 3, 2022
2 parents 80a6927 + 9b752b7 commit 297b331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/xlnt/utils/numeric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ constexpr Number abs(Number val)
/// constexpr max
/// </summary>
template <typename NumberL, typename NumberR>
constexpr typename std::common_type<NumberL, NumberR>::type max(NumberL lval, NumberR rval)
constexpr typename std::common_type<NumberL, NumberR>::type (max)(NumberL lval, NumberR rval)
{
return (lval < rval) ? rval : lval;
}
Expand All @@ -60,7 +60,7 @@ constexpr typename std::common_type<NumberL, NumberR>::type max(NumberL lval, Nu
/// constexpr min
/// </summary>
template <typename NumberL, typename NumberR>
constexpr typename std::common_type<NumberL, NumberR>::type min(NumberL lval, NumberR rval)
constexpr typename std::common_type<NumberL, NumberR>::type (min)(NumberL lval, NumberR rval)
{
return (lval < rval) ? lval : rval;
}
Expand Down

0 comments on commit 297b331

Please sign in to comment.