Checked.min

Defines the minimum and maximum. These values are hookable by defining Hook.min and/or Hook.max.

  1. enum Checked!(T, Hook) min;
  2. enum Checked!(T, Hook) min;
    struct Checked(T, Hook = Abort)
    static if(!(hasMember!(Hook, "min")))
    enum Checked!(T, Hook) min;

Examples

assert(Checked!short.min == -32768);
assert(Checked!(short, WithNaN).min == -32767);
assert(Checked!(uint, WithNaN).max == uint.max - 1);

Meta