"Named parameter builder" pattern for template parameters
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 26 13:10:17 PST 2014
On Wednesday, 26 November 2014 at 17:42:07 UTC, Robik wrote:
> If D would support getting parameter names(currently does not
> work for lambdas) of lambdas we could have:
>
> someConnect(host => "test", port => 7999);
>
> Just a random thought :)
import std.stdio;
import std.traits;
void main()
{
//Prints a blank line
writeln(ParameterIdentifierTuple!((int n) => n));
}
That's an annoying limitation. I've submitted a bug for it.
https://issues.dlang.org/show_bug.cgi?id=13780
More information about the Digitalmars-d
mailing list