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

Allowed values constraint ( enum ). More...

#include <constraints.hpp>

Collaboration diagram for anch::val::Allowed< A >:

Public Member Functions

template<typename V>
requires std::equality_comparable_with<V, A>
bool check (const V &value, std::string &message) const

Public Attributes

std::vector< A > values

Detailed Description

template<typename A>
struct anch::val::Allowed< A >

Allowed values constraint ( enum ).

Template Parameters
Athe allowed values type
Author
Vincent Lachenal
Since
0.2

Member Function Documentation

◆ check()

template<typename A>
template<typename V>
requires std::equality_comparable_with<V, A>
bool anch::val::Allowed< A >::check ( const V & value,
std::string & message ) const

Check value

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

Member Data Documentation

◆ values

template<typename A>
std::vector<A> anch::val::Allowed< A >::values

Allowed values


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