Simple-Utility v2.3.1
Loading...
Searching...
No Matches
predicate

Contains the Predicate closure template. More...

Collaboration diagram for predicate:

Typedefs

template<function Fn>
using sl::functional::Predicate = BasicClosure< Fn, PredicateInvokePolicy, PipeOperator, EqualityOperator, ConjunctionOperator, DisjunctionOperator, NegationOperator >
 Closure template for predicate like types, which accepts a functional type and enables pipe, negation, conjunctive and disjunctive chaining, and equality comparison.
 

Detailed Description

Contains the Predicate closure template.

Predicate types aim to simplify the composition of multiple conditions. Predicates are therefore pipe-able with any other functional type (the params and return types still have to match, which can't be checked before the actual invocation) and offer many more composing operators. Predicates also aim to be flat as possible, which means, if users chain multiple predicates via supported operators, instead of simply building a tree like structure, the functional objects will be combined into one Composition. This keeps the calling-hierarchy as flat as possible and also supports easier debugging.

Typedef Documentation

◆ Predicate

Closure template for predicate like types, which accepts a functional type and enables pipe, negation, conjunctive and disjunctive chaining, and equality comparison.

Template Parameters
FnThe functional type.