19 #ifndef NUMBER_LIMITER_H
20 #define NUMBER_LIMITER_H
24 #include <type_traits>
31 static void apply(T &value, T min = std::numeric_limits<T>::min(), T max = std::numeric_limits<T>::max()){
32 static_assert(std::is_arithmetic<T>::value,
"The value for \"apply\" must be arithemtic");
40 static void applyD(T &value, T defvalue, T min = std::numeric_limits<T>::min(), T max = std::numeric_limits<T>::max()){
41 static_assert(std::is_arithmetic<T>::value,
"The value for \"applyD\" must be arithemtic");
42 if((value<min)||(value>max))
45 apply(value, min, max);
52 #endif // NUMBER_LIMITER_H
Definition: number_limiter.h:27