Unique.this

Constructor that takes a Unique of a type that is convertible to our type.

Typically used to transfer a Unique rvalue of derived type to a Unique of base type.

  1. this(TR p)
  2. this(TR p)
  3. this(Unique!U u)
    struct Unique(T, ALLOC = void)
    this
    (
    U
    )
    ()
    if (
    is(u.TR : TR)
    )

Examples

class C : Object {}

Unique!C uc = new C;
Unique!Object uo = uc.release;

Meta