[Issue 11946] "need 'this' to access member" when passing field to template parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 26 12:46:51 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11946
--- Comment #24 from Walter Bright <bugzilla at digitalmars.com> 2014-01-26 12:46:49 PST ---
Some thoughts:
1. 'static' in D has come to mean "a context pointer is not supplied". For
example, in C:
void foo() {
static int x;
}
x can be accessed without the "context pointer", in this case the stack
pointer. Static doesn't mean it is unnested or global.
2. Alias template arguments are never "passed" to a template in the way that
arguments are passed to functions. They simply make the symbol in scope in the
template body.
3. Static as an attribute makes no sense in a context where there is no context
pointer. I.e. declarations at global level, declarations inside global
templates, etc.
4. A use of a symbol, where that use does not require a context pointer, should
not issue an error if a context pointer is not supplied.
5. I don't think we're going to resolve this easily without a lot of careful
thought.
--
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