TypeofThis

In D1, typeof(this) is always a reference type to the aggregate, while in D2 it's the actual type of the aggregate. It doesn't change anything for classes which are reference types, but for struct and unions, it yields a pointer instead of the actual type. d1tod2fix does the conversion automatically for structs, but there are places where manual intervention is needed (e.g. mixin templates).

template TypeofThis () {}

Members

Aliases

This
alias This = typeof(this)
Undocumented in source.

Meta