On 9/15/12, Ben Davis <[email protected]> wrote: > Never mind, I found the answer in the 'templates' page of the spec: > > class Super { > T doStuff(this T)() { ...; return cast(T)this; } > }
Btw I think that's a dynamic cast, unless the compiler can optimize it
(I mean it should since it's a template function right?). I saw this
static cast thingy laying around somewhere:
auto static_cast(T,U)(U source)
{
return cast(T)(cast(void*)source);
}
