On Friday, 20 November 2015 at 20:39:58 UTC, Ilya wrote:
Can DMD frontend optimize string concatenation ``` enum Double(S) = S ~ S;assert(condition, "Text " ~ Double!"+" ~ ___FUNCTION__); ``` to ``` assert(condition, "Text ++_function_name_"); ``` ?
If you really want to make sure it is concatenated at compile time, just do this:
... enum CT(alias S) = S;assert(condition, CT!("Text " ~ Double!"+" ~ ___FUNCTION__)); // Must be evaluated at CT no matter what