cinvoke(3) | cinvoke(3) |
cinvoke - container function invocation
#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
Invokes a non-container function as if it was a container function.
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.
cfn(3)