doTimes

Execute Expression expr inline the same way n times. n must be a constant known at compile time.

  1. void doTimes(uint n, void expr)
  2. void doTimes(void expr)
    void
    doTimes
    (
    uint n
    )
    (
    lazy void expr
    )

Examples

int i = 0;
doTimes!4(i++);
assert(i == 4);

Meta