[Issue 11946] "need 'this' to access member" when passing field to template parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 3 07:56:29 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11946
--- Comment #30 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-03-03 17:56:27 EET ---
The irony is that as much as I dislike this approach, it does allow doing more
things with template alias parameters, and I've started to rely on it in my own
code. I even took it a step further in
https://github.com/D-Programming-Language/dmd/pull/3345 to do the same things
with methods.
I noticed Kenji wrote this on the D Wiki:
http://wiki.dlang.org/Brush_Up_Language_Features#Nested_Symbols
The idea is to introduce "static alias" template parameters, which make it
explicit if the alias parameter needs to transmit the symbol's context to the
template (and thus nest the template within that context), or not. I think it
is a sensible approach in lieu of automagically determining if that context is
needed by the template (which Kenji claims is "mostly impossible").
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list