XIEITE_LIFT ()
, XIEITE_LIFT_LOCAL ()
, XIEITE_LIFT_ONE ()
, XIEITE_LIFT_LOCAL_ONE ()
Defined in header <xieite/lift.hpp>
(header-only:
<xieite/pp/lift.hpp>
)
Wraps a function in a lambda object.
Definitions
#0Expands to a lambda with no capture-default and variadic parameters.#define XIEITE_LIFT (...)/* ... */
#1
Expands to a lambda with a reference capture-default and variadic parameters.#define XIEITE_LIFT_LOCAL (...)/* ... */
#2
Expands to a lambda with no capture-default and one parameter.#define XIEITE_LIFT_ONE (...)/* ... */
#3
Expands to a lambda with a reference capture-default and one parameter.#define XIEITE_LIFT_LOCAL_ONE (...)/* ... */
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 ExplorerHello, world!