TaggedAlgebraic.opDispatch

Enables accessing properties/fields of the stored value.

  1. auto opDispatch(auto ref ARGS args)
  2. ARGS opDispatch [@property setter]
    struct TaggedAlgebraic(U)
    @property
    opDispatch
    (
    string name
    this TA
    ARGS...
    )
    (
    auto ref ARGS args
    )
    if (
    hasOp!(TA, OpKind.field, name, ARGS) &&
    !hasOp!(TA, OpKind.method, name, ARGS)
    )
    if (
    is(U == union) ||
    is(U == struct)
    )

Meta