function handle_with
July 9, 2022 ยท View on GitHub
template <typename H>
typename H::answer_type handle_with(
int64_t label, std::function<typename H::body_type()> body, std::shared_ptr<H> handler);
template <typename H>
typename H::answer_type handle_with(
std::function<typename H::body_type()> body, std::shared_ptr<H> handler);
Handle the computation body using the given handler of type H.
-
typename H- The type of the handler that is used to handlebody. -
int64_t label- Explicit label given tohandler. If no label is given, this handler is used based on the types of the commands ofH(the innermost handler that handles the invoked command is used). -
std::function<typename H::body_type()> body- The handled computation. -
std::shared_ptr<H> handler- The handler used to handlebody. -
Return value
H::answer_type- The final answer of the handler, returned by one of the overloads ofH::handle_commandorH::handle_return.