SumType.opAssign

Assigns a value to a SumType.

Assigning to a SumType is @system if any of the SumType's members contain pointers or references, since those members may be reachable through external references, and overwriting them could therefore lead to memory corruption.

An individual assignment can be @trusted if the caller can guarantee that there are no outstanding references to any of the SumType's members when the assignment occurs.

  1. SumType opAssign(T rhs)
    struct SumType(Types...)
    private public ref
    static if(isAssignableTo!T)
    opAssign
    (
    T rhs
    )
    if (
    is(NoDuplicates!Types == Types) &&
    )
  2. SumType opAssign(SumType rhs)
  3. SumType opAssign(SumType rhs)
  4. SumType opAssign(SumType rhs)

Meta