template<typename Rep, Rep Min, Rep Max>
struct ble::Bounded< Rep, Min, Max >
Restrict values of an integer type to a defined range.
The range is a closed interval that includes its left-bound (Min) and right-bound value (Max).
- Template Parameters
-
Rep | The C++ integer type used to represent the values. |
Min | Minimum value allowed. |
Max | Maximum value allowed. |
Definition at line 37 of file Bounded.h.
Construct a bounded integer.
If v is out of the range [Min : Max], then if it is less than Min, the value of the bounded integer will be Min. If it greater than Max, then the value of the bounded integer will be Max.
- Parameters
-
Definition at line 47 of file Bounded.h.