denature

Denatures F on args to create a void function with no arguments.

This is particularly useful when (unsafely) invoking a function from another thread.

@nogc
denature
(
ARGS...
)
(
auto ref ARGS args
)
if (
__traits(compiles, )
)

Parameters

F

The function to denature.

args ARGS

The arguments to denature F to.

Return Value

Type: auto

A void function() which invokes F on args.

Remarks: Supports renaturing arguments by reference, which may be especially unsafe.

Meta