XIEITE_LIFT ()
, XIEITE_LIFT_LOCAL ()
, XIEITE_LIFT_ONE ()
, XIEITE_LIFT_ONE_LOCAL ()
Defined in header <xieite/lift.hpp>
(header-only:
<xieite/pp/lift.hpp>
)
Wraps a function in a lambda object.
Definitions
#liftExpands to a lambda expression with no capture-default and variadic parameters.#define XIEITE_LIFT (...)/* [](???) XIEITE_ARROW(__VA_ARGS__(???...)) */
#lift-local
Expands to a lambda expression with a reference capture-default and variadic parameters.#define XIEITE_LIFT_LOCAL (...)/* [&](???) XIEITE_ARROW(__VA_ARGS__(???...)) */
#lift-one
Expands to a lambda expression with no capture-default and one parameter.#define XIEITE_LIFT_ONE (...)/* [](???) XIEITE_ARROW(__VA_ARGS__(???)) */
#lift-one-local
Expands to a lambda expression with a reference capture-default and one parameter.#define XIEITE_LIFT_ONE_LOCAL (...)/* [&](???) XIEITE_ARROW(__VA_ARGS__(???)) */
Example
Output:#include <xieite/fwd.hpp> #include <xieite/lift.hpp> import std ;void run (auto&& fn ) {std ::invoke (XIEITE_FWD (fn ),"Hello, world! ); }\n "int main () {run (XIEITE_LIFT (std ::printf )); }
[View in Compiler Explorer]Hello, world!