Possible @property compromise
TommiT
tommitissari at hotmail.com
Thu Jan 31 19:28:01 PST 2013
On Friday, 1 February 2013 at 03:08:12 UTC, Zach the Mystic wrote:
> alias template theFuncIActuallyWant this;
>
> int theFuncIActuallyWant() { return 1; }
>
> ...in order to have it pass the right thing to the template
> parameter? That's just a jury rigged syntax which might help
> structs make more sense to the compiler when passed through
> templates.
None of the alias this conversions are even looked at when you
pass a variable to a templated parameter. The template simply
conforms to whatever type the passed variable is. No conversions
ever happen. That's just how templates work in D. I can't right
off the bat say that it's impossible to design a language where
templates perform conversions. But it's safe to say that it's not
happening with this language. It would be a huge change.
More information about the Digitalmars-d
mailing list