defineArg.defineArg

Undocumented in source.
template defineArg(alias cmdLineParser, string name, alias var, int flags = cast(int)ArgFlag.Optional, string desc = "")
static if(!(!is(typeof(var) == int) && !is(typeof(var) == int[]) && !is(typeof(var) == bool) && !is(typeof(var) == bool[]) && !is(typeof(var) == string) && !is(typeof(var) == string[])))
enum defineArg = "\n" ~ "auto _cmdarg_refbox_" ~ name ~ " = new " ~ nameof!(RefBox) ~ "!(" ~ typeof(var).stringof ~ ")(&" ~ var.stringof ~ ");\n" ~ "auto _cmdarg_" ~ name ~ " = new Arg(_cmdarg_refbox_" ~ name ~ `, "` ~ name ~ `", ` ~ desc.stringof ~ `);` ~ "\n" ~ cmdLineParser.stringof ~ ".addArg(_cmdarg_" ~ name ~ ", cast(ArgFlag)(" ~ flags.stringof ~ "));\n";

Meta