Perfect forwarding

Adam D. Ruppe destructionator at gmail.com
Sun Jul 26 03:59:00 UTC 2020


Oops, I forgot about default arguments and specializations.

Default arguments are relatively straightforward, can do it at 
least as hacky as the runtime function variety.

But specializations are tricky to represent. The closest thing we 
have in the normal language is the `is` expression... but it 
isn't exactly the same... still if it could be like an is lambda 
it might work...

To be honest I suspect the best way to do this at this point 
would be to make it part of the opaque slice type. So if you 
define a new template with it, it inherits that but otherwise you 
can't really look in. I'm not satisfied with that but it might be 
the most practical thing to do right now and can be revisited in 
the future once the basic functionality actually works.


More information about the Digitalmars-d mailing list