The OpenD Programming Language

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(RefT p)
  2. this(RefT p)
  3. this(Unique!U u)
    struct Unique(T)
    this
    (
    U
    )
    ()
    if (
    is(u.RefT : RefT)
    )

Examples

class C : Object {}

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

Meta