https://issues.dlang.org/show_bug.cgi?id=12666
--- Comment #1 from bearophile_h...@eml.cc --- (In reply to bearophile_hugs from comment #0) > enum msg = "Attempting to fetch the front of an empty array of " ~ > T.stringof; > assert(a.length, msg); A little shorter code, that requires less changes: assert(a.length, ctEval!("Attempting to fetch the front of an empty array of " ~ T.stringof)); Where ctEval is a very small construct that should be added to Phobos that forces the evaluation of an expression at compile-time. --