https://issues.dlang.org/show_bug.cgi?id=18397 --- Comment #3 from anonymous4 <dfj1esp02 at sneakemail.com> --- Why it creates sting literal instead of string itself? Then you could just do --- enum string hexString = hexStrImpl(hexData); --- --