It works when you exclude the recursive alias this: static if(!is(T == const)) alias constify this;Your original program crashes the compiler, which is always a bug. I filed an issue:https://issues.dlang.org/show_bug.cgi?id=14499
Thank you, very much.