pow

Raises a unit instance to a given power.

Because the exponent must be known at compile-time (as the type of the result depends on it), overloading the ^^ operator for units.

  1. auto pow(U u)
    @safe
    pow
    (
    Exp
    U
    )
    (
    U u
    )
    if (
    isUnit!U
    )
  2. auto pow(U u)
  3. auto pow(Q q)
  4. auto pow(Q q)

Examples

enum squareMetre = pow!2(metre);

Meta