Multiple of constraint ( multipleOf ).
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 |
Multiple of constraint ( multipleOf ).
Integers are checked exactly. With floating point numbers, the quotient has to be an integer with a relative tolerance ( 0.3 is a multiple of 0.1 ).
| N | the divisor type |
| bool anch::val::MultipleOf< 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 | N anch::val::MultipleOf< N >::value |
Divisor (strictly positive)