Template Function nix::valid::must¶
Defined in File conditions.hpp
Function Documentation¶
-
template<typename TOBJ, typename TBASEOBJ, typename TRET, typename TCHECK>
condition nix::valid::must(const TOBJ &parent, TRET (TBASEOBJ::* get)(void) const, const TCHECK &check, const std::string &msg, const std::vector<condition> &subs = {})¶ creates condition throwing error if check fails
Creates a condition check that produces an error with the given message if the given function call’s return value does not pass the test. NOTE: the list of sub conditions is being executed in the given order if and only if this conditions’ check passes. The results are merged and returned together. Also catches any errors occuring on execution of the given function call.
- Parameters
- Returns
The created, callable condition of type condition