CopySignature

CTFE template for genering a string for mixin copying a function's signature along with its default values

template CopySignature (
alias srcFunc
int argumentsBegin = 0
int argumentsEnd = Parameters!srcFunc.length
) {}

Members

Functions

genCallList
string genCallList()

Generate a calling list. Simply the list of arg0 through argN separated by commas

genDefinitionList
string genDefinitionList()

Generates a definition list.

Bugs

Due to issue 18572 this will not copy extended attributes of the arguments (ref, out etc). All arguments are passed by value.

The generated code refers to srcFunc by its fully qualified name. Unfortunately, this means we cannot apply to functions nested inside other functions.

Meta