Warn.onOverflow

Called automatically upon an overflow during a unary or binary operation.

  1. typeof(~Lhs()) onOverflow(Lhs lhs)
    struct Warn
    static
    typeof(~Lhs())
    onOverflow
    (
    string x
    Lhs
    )
    (
    ref Lhs lhs
    )
  2. typeof(Lhs() + Rhs()) onOverflow(Lhs lhs, Rhs rhs)

Parameters

x

The operator involved

Lhs

The first argument of Checked, e.g. int if the left-hand side of the operator is Checked!int

Return Value

Type: typeof(~Lhs())

mixin(x ~ "lhs") for unary, mixin("lhs" ~ x ~ "rhs") for binary

Meta