AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::val::Minimum< N > Struct Template Reference

Minimum value constraint ( minimum and exclusiveMinimum ). More...

#include <constraints.hpp>

Collaboration diagram for anch::val::Minimum< N >:

Public Member Functions

template<anch::val::Number V>
bool check (const V &number, std::string &message) const

Public Attributes

N value
bool exclusive = false

Detailed Description

template<anch::val::Number N>
struct anch::val::Minimum< N >

Minimum value constraint ( minimum and exclusiveMinimum ).

Integers are compared without conversion ( std::cmp_less ), floating point numbers as long double .

Template Parameters
Nthe bound type
Author
Vincent Lachenal
Since
0.2

Member Function Documentation

◆ check()

template<anch::val::Number N>
template<anch::val::Number V>
bool anch::val::Minimum< N >::check ( const V & number,
std::string & message ) const

Check value

Template Parameters
Vthe value type
Parameters
numberthe value
messagethe error message (set when value is invalid)
Returns
true when value is valid

Member Data Documentation

◆ exclusive

template<anch::val::Number N>
bool anch::val::Minimum< N >::exclusive = false

Value has to be greater than minimum (instead of greater or equal)

◆ value

template<anch::val::Number N>
N anch::val::Minimum< N >::value

Minimum value


The documentation for this struct was generated from the following file: