Redirect to different overloads at compile time?
David Bregman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jun 29 22:06:30 PDT 2014
On Monday, 30 June 2014 at 04:50:05 UTC, Kenji Hara wrote:
> In D, you can merge arbitrary overloads by using alias
> declaration.
Oh wow, you are right. That's a nice feature!
I guess I simplified too much for the sake of making the post,
the functions I would actually like to merge are function
pointers. I assumed it was the same but I was wrong, sorry.
double function(double d) foo_double;
float function(float f) foo_float;
In this case, trying to use alias to merge them causes an error.
More information about the Digitalmars-d-learn
mailing list