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

Custom constraint. More...

#include <constraints.hpp>

Collaboration diagram for anch::val::Custom< V >:

Public Member Functions

bool check (const V &value, std::string &error) const

Public Attributes

std::function< bool(const V &)> predicate
std::string message

Detailed Description

template<typename V>
struct anch::val::Custom< V >

Custom constraint.

Template Parameters
Vthe value type
Author
Vincent Lachenal
Since
0.2

Member Function Documentation

◆ check()

template<typename V>
bool anch::val::Custom< V >::check ( const V & value,
std::string & error ) const

Check value

Parameters
valuethe value
errorthe error message (set when value is invalid)
Returns
true when value is valid

Member Data Documentation

◆ message

template<typename V>
std::string anch::val::Custom< V >::message

Error message

◆ predicate

template<typename V>
std::function<bool(const V&)> anch::val::Custom< V >::predicate

Predicate: true when value is valid


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