diff --git a/src/core/common/num_utils.hpp b/src/core/common/num_utils.hpp index 6d031f4c6..8f112d4c6 100644 --- a/src/core/common/num_utils.hpp +++ b/src/core/common/num_utils.hpp @@ -159,7 +159,7 @@ template int8_t ClampToInt8(IntType aValue) * @retval TRUE If @p aValue is within `[aMin, aMax]` (inclusive). * @retval FALSE If @p aValue is not within `[aMin, aMax]` (inclusive). */ -template Type IsValueInRange(Type aValue, Type aMin, Type aMax) +template inline constexpr bool IsValueInRange(Type aValue, Type aMin, Type aMax) { return (aMin <= aValue) && (aValue <= aMax); }