So sometimes it is not possible to get string length compile time:
void foo(T: E[N], E, size_t N)(auto ref T data) { pragma(msg, "static"); pragma(msg, data.length); } void foo(T: E[], E)(auto ref T data) { pragma(msg, "dynamic"); pragma(msg, data.length); // Error: variable data // cannot be read at compile time } ... foo("test");