SumType.opAssign

Assigns a value to a SumType.

Assigning to a SumType is @system if any of the SumType's other 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, when the assignment occurs, there are no outstanding references to any such members.

  1. SumType opAssign(T rhs)
    struct SumType(Types...)
    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