Bug or Feature: `this` necessary to call function with template this parameter

Q. Schroll qs.il.paperinik at gmail.com
Wed Oct 30 20:22:25 UTC 2019


struct Example
{
     private void helper(int i, this X)() { }
     void funcTempl(T, this X)(T value)
     {
         this.helper!0();
     //  ^^^^^ Why do I need this?
     }
}

void main()
{
     auto ex = Example();
     ex.funcTempl(1);
}

The question is in the comment in the code. Is that intentional 
or a bug?


More information about the Digitalmars-d-learn mailing list