Merge branch 'master' into patch-6

This commit is contained in:
Teebonne 2022-12-06 10:09:24 +00:00 committed by GitHub
commit 45eadf5674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ constexpr Number abs(Number val)
/// constexpr max /// constexpr max
/// </summary> /// </summary>
template <typename NumberL, typename NumberR> 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; return (lval < rval) ? rval : lval;
} }
@ -60,7 +60,7 @@ constexpr typename std::common_type<NumberL, NumberR>::type max(NumberL lval, Nu
/// constexpr min /// constexpr min
/// </summary> /// </summary>
template <typename NumberL, typename NumberR> 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; return (lval < rval) ? lval : rval;
} }