Unique.this

this(RefT p)

Constructor that takes an rvalue. It will ensure uniqueness, as long as the rvalue isn't just a view on an lvalue (e.g., a cast). Typical usage: ---- Unique!Foo f = new Foo; ----

this(ref RefT p)

Constructor that takes an lvalue. It nulls its source. The nulling will ensure uniqueness as long as there are no previous aliases to the source.

this(Unique!U u)

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. Example:

class C : Object {}

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