cinvoke(3) cinvoke(3)

NAME

cinvoke - container function invocation

SYNOPSIS

#include <cfl/invoke/cinvoke.hpp>
#include <cfl/bind/bind.hpp>

template <typename F, typename... ARGS>
/*unspecified*/ cinvoke (F && f, ARGS &&... args)

auto f = [] (int a, int b) { return a + b; };
cinvoke (f, 1__, 2) (1) == 3

DESCRIPTION

Invokes a non-container function as if it was a container function.

RETURN VALUES

Without any placeholder or future arguments, f (args...) is returned. With at least on placeholder argument, a closure is returned. Without any placeholder, but at least one future argument, another future is returned.

SEE ALSO

cfn(3)