Lazy mixins

Philippe Sigaud philippe.sigaud at gmail.com
Tue Mar 25 21:04:31 PDT 2014


> No, I think I mentioned that string mixins can't get the context they are
> inserted in. Why would I simply wrap a string mixin around a template mixin
> if there wasn't some purpose that string mixins couldn't use in the first
> place?

OK. I just preferred to ask, to be sure.

> Hence you can't do both. Use string mixins and you got to supply the
> argument. Use template mixins and you can't overload properly(which makes it
> useless in my case). If one could evaluate the string mixin after the
> template mixin then it would all work. (and yes, it is the solution I want
> unless you can actually come up with something that solves the problem
> directly(both overloads properly and allows one to get the context)
>
> One can't do something like
>
> template B(T = typeof(this))
> {
>
> }

Did you try using a this template parameter?


More information about the Digitalmars-d mailing list