Utopia 2
Framework for studying models of complex & adaptive systems.
|
Helper class for checking rule signatures and return types. More...
#include <apply.hh>
Public Types | |
using | type = std::invoke_result_t< Rule, typename std::remove_reference_t< Args >::reference... > |
Report rule invoke result. | |
Helper class for checking rule signatures and return types.
This class checks if a rule can be invoked with the given arguments (note that Args
are expected to be conainers/sequences of the actual arguments) and reports the rule return type. It also statically checks if the rule return type can be converted to the expected state, but only if the rule does not return void
.
State | The state type of the entities this rule is applied on |
Rule | The type of the rule |
Args | One or multiple containers with rule arguments |
using Utopia::rule_invoke_result< State, Rule, Args >::type = std::invoke_result_t< Rule, typename std::remove_reference_t<Args>::reference...> |
Report rule invoke result.