Typedef

Replacement for typedef which is completely deprecated.

It generates a wrapper struct with alias this.

Used as mixin(Typedef!(hash_t, "MyHash"))

IsTypedef member alias is defined so that any struct type can be quickly checked if it originates from typedef via is(typeof(S.IsTypedef)). This is a hack reserved for backwards compatibility in libraries and should never be relied upon in user code.

  1. template Typedef(T, istring name, T initval)
    template Typedef (
    T
    istring name
    T initval
    ) {}
  2. template Typedef(T, istring name)

Members

Manifest constants

Typedef
enum Typedef;
Undocumented in source.

Parameters

T

type to typedef

name

identifier string for new type

initval

optional default value for that type

Meta