PhilippeSigaud/D-templates-tutorial — Issue #11: static if ... static assert pattern
Author: jwhear
Created: 2012-01-16 20:34:24+00:00
State: open

I noticed that the following pattern appears regularly (example 22.1.4):

static if (someCondition)
static assert(0, "message");

When the code could be written simply as

static assert(someCondition, "message");

If this is a deliberate style decision, you might consider making a note of it somewhere and informing the reader that static assert takes an expression just like its runtime cousin.