Maximum value constraint ( maximum and exclusiveMaximum ).
More...
#include <constraints.hpp>
Public Member Functions | |
| template<anch::val::Number V> | |
| bool | check (const V &number, std::string &message) const |
Public Attributes | |
| N | value |
| bool | exclusive = false |
Maximum value constraint ( maximum and exclusiveMaximum ).
Integers are compared without conversion ( std::cmp_less ), floating point numbers as long double .
| N | the bound type |
| bool anch::val::Maximum< N >::check | ( | const V & | number, |
| std::string & | message ) const |
Check value
| V | the value type |
| number | the value |
| message | the error message (set when value is invalid) |
true when value is valid | bool anch::val::Maximum< N >::exclusive = false |
Value has to be lower than maximum (instead of lower or equal)
| N anch::val::Maximum< N >::value |
Maximum value