[Issue 9840] Methods in templates should likely not require the 'this' reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 23 19:23:19 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=9840



--- Comment #3 from yebblies <yebblies at gmail.com> 2013-11-24 14:23:18 EST ---
(In reply to comment #2)
> (In reply to comment #1)
> > Do you really want it to automatically make inner methods static?  That seems
> > like a bit much.
> 
> No. I always forget that templated functions are really:
> 
> template foo(T)
> {
>     void foo(T t) { }
> }
> 
> So that was my mistake. But I think the call through the instance should work,
> no?

But you never call it through an instance.  'get' only gets called from the
enum's initializer, which does _not_ have an instance.

-- 
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