Key arguments
Jarrett Billingsley
kb3ctd2 at yahoo.com
Mon Jul 14 10:19:45 PDT 2008
"downs" <default_357-line at yahoo.de> wrote in message
news:g5fsef$p0d$4 at digitalmars.com...
> Such abject nonsense. My hack is based on typesystem abuse, not global
> *variables*
Your face is abject nonsense!
> It also doesn't use structs.
>
> Basically, the idea is that you typedef double y_parameter; then
> y_parameter y_p(double d) { return cast(y_parameter) d; }
>
> Then just make f a templated function, so that void f(T...)(int x, T t);
> and check for the presence of a y_parameter in T.
>
> Called like so: f(2, y_p = 5f);
More information about the Digitalmars-d-learn
mailing list