UnitImpl.opBinary

Multiplication/division of an unit and a value type, constructing a Quantity instance.

  1. auto opBinary(Rhs rhs)
  2. auto opBinary(Rhs rhs)
  3. auto opBinary(V rhs)
    mixintemplate UnitImpl()
    opBinary
    (
    string op : "*"
    V
    )
    (
    V rhs
    )
    if (
    !(
    isUnit!V ||
    isQuantity!V
    )
    )
  4. auto opBinary(V rhs)
  5. auto opBinaryRight(V lhs)
  6. auto opBinaryRight(V lhs)

Examples

auto a = 2 * metre;
auto b = 2 / metre;
auto c = metre * 2;
auto d = metre / 2;

Meta