A constraint class to ensure an integer value is between two numbers (inclusive).
More...
#include <ConfigConstraints.hpp>
|
| constexpr | NumberValueConstraint (NumType min, NumType max) |
| | Constructs a constraint where the number must be between min_ and max_.
|
| std::optional< Error > | checkConstraint (Value const &val) const |
| | Check if the value meets the specific constraint.
|
|
| template<std::size_t ArrSize> |
| constexpr std::string | makeErrorMsg (std::string_view key, Value const &value, std::array< std::string_view, ArrSize > arr) const |
| | Creates an error message for all constraints that must satisfy certain hard-coded values.
|
template<typename NumType>
class util::config::NumberValueConstraint< NumType >
A constraint class to ensure an integer value is between two numbers (inclusive).
- Template Parameters
-
| NumType | The numeric type of the bounds |
◆ NumberValueConstraint()
template<typename NumType>
Constructs a constraint where the number must be between min_ and max_.
- Parameters
-
| min | the minimum number it can be to satisfy this constraint |
| max | the maximum number it can be to satisfy this constraint |
The documentation for this class was generated from the following file: