https://issues.dlang.org/show_bug.cgi?id=19299
Nick Treleaven <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Nick Treleaven <[email protected]> --- Just to mention, you can copy parameters like this: ```d // simpler version of std.traits.Parameters (which also works) template Params(alias func) { static if (is(typeof(func) PS == __parameters)) alias Params = PS; } void f(Params!g, int extra); void g(char c = 0, byte b); pragma(msg, typeof(f)); ``` If you need just one parameter, use slicing `PS[i..i+1]` rather than indexing and it will preserve not just the type but the identifier and default argument too. --
