Forward declaration of policy. More...
#include <policy.hpp>
Public Member Functions | |
template<class... Args> | |
constexpr auto | operator() (Args...) -> std::enable_if_t< std::is_invocable_r_v< bool, PolicyFn > &&!std::is_invocable_r_v< bool, PolicyFn, Args... >, bool > |
Call operator overload. More... | |
policy ()=default | |
Default constructor. More... | |
constexpr | policy (PolicyFn fn) |
Conversion constructor. More... | |
Forward declaration of policy.
Policy template class.
A policy is a declarative lazily-evaluated possibly stateful predicate that can be composed with other predicates using overloaded boolean operators.
Two policies can be composed if any of the following conditions is satisfied:
If the second condition applies, the resulting policy will have to be called with the arguments of the one that does take arguments.
A policy should be cheaply copyable and its arguments will always be passed by const-reference.
Definition at line 24 of file policy.hpp.
|
default |
Default constructor.
|
inlineexplicitconstexpr |
Conversion constructor.
Definition at line 107 of file policy.hpp.
|
inlineconstexpr |
Call operator overload.
If the function object can be called with no arguments, enable this overload that takes any amount of arguments so it can be composed with any other policy.
Definition at line 119 of file policy.hpp.