Summary: template alias parameters cannot take 'this'
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from SHOO <> 2010-09-03 08:11:24 PDT ---
This code doesn't work:
template Template(alias v){ bool Template = true; }

class C
        void func() { assert(Template!(this)); }

prog.d(5): Error: expression this is not a valid template value argument
prog.d(5): Error: template instance prog.Template!(this) error instantiating

I wondered whether it is specified behavior.
But, I think this code should be able to compile.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to