Template 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) ;

Contained Functions

NameDescription
genCallList Generate a calling list. Simply the list of arg0 through argN separated by commas
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.