opDispatch

Danny via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Dec 25 07:59:43 PST 2014


I tried to make it even simpler to get to the core of the problem 
I'm having:

...
     template opDispatch(string s) {
         alias value.a opDispatch;
     }

The compiler then complains:
error: need 'this' for 'a' of type 'int'

I can only think: And? It's right there... it's a class instance, 
it has 'this'.


More information about the Digitalmars-d-learn mailing list