[Issue 5295] Template basename recognized as valid type inside template - shouldn't be.
http://d.puremagic.com/issues/show_bug.cgi?id=5295 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED CC||schvei...@yahoo.com Resolution||INVALID --- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2010-12-03 18:20:05 PST --- It's not explicitly mentioned, but it is covered indirectly. Note that: class C(T) { ... } is equivalent to template C(T) { class C { ... } } If you look at it this way, then it becomes: template C(T) { class C { C[] ary; ... } } when you look at the class definition, it makes sense that C inside the class refers to the class itself. as it would outside the template. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5295] Template basename recognized as valid type inside template - shouldn't be.
http://d.puremagic.com/issues/show_bug.cgi?id=5295 Simen Kjaeraas simen.kja...@gmail.com changed: What|Removed |Added CC||simen.kja...@gmail.com --- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2010-12-01 03:53:14 PST --- This seems not to be mentioned on http://digitalmars.com/d/2.0/template.html, but it is well-known and oft-used. The idea is that instead of having to type Foo!(int, bar, 42, MeaningOfLiff) everytime you want typeof(this), you can just use Foo. Foo!(int, bar, 42, MeaningOfLiff) still works, so nothing (as far as I can see) is lost. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---