morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::forms::ComparableAgainstLiteral Concept Reference

Constraint: a field of type V can be compared against a literal of type L at all. More...

#include <forms.hpp>

Concept definition

template<typename V, typename L>
concept ComparableAgainstLiteral = requires(const V& fieldValue, const L& literal) {
{ detail::equalsOperand(fieldValue) == literal } -> std::convertible_to<bool>;
}
Constraint: a field of type V can be compared against a literal of type L at all.
Definition forms.hpp:1290

Detailed Description

Constraint: a field of type V can be compared against a literal of type L at all.

Checked at the equals(...) call site rather than left to fail inside Equals::test. equals(&A::someQuantity, "URGENT") produced 83 lines whose first error was no match for 'operator==' deep inside this header, with no mention of equals and nothing pointing at the caller's own formRules.

(V is the field member type and L the literal type. Neither is documented with a parameter-doc command: on a concept that is an error under -Weverything -Werror – see the note on Condition above.)

Definition at line 1290 of file forms.hpp.