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. void opAssign(T rhs)
    struct SumType(TypeArgs...)
    static if(isAssignable!T)
    void
    opAssign
    ()
    (
    auto ref T rhs
    )
    if (
    is(NoDuplicates!TypeArgs == TypeArgs) &&
    TypeArgs.length > 0
    )
  2. void opAssign(SumType rhs)
  3. void opAssign(SumType rhs)
  4. void opAssign(SumType rhs)

Meta