Compile-time version of traceVal.
Only works for string values right now.
Usage:
enum fooStr = "Hi"; enum fooStr2 = "Hi2"; mixin(traceValCT!("fooStr", "fooStr2")); mixin(traceValCT!(`fooStr~" Joe"`)); template fooTmpl { enum fooTempl = "Hello World"; mixin(traceValCT!(true, "fooTempl")); }
Turns Into:
enum fooStr = "Hi"; enum fooStr2 = "Hi2"; pragma(msg, "fooStr: " ~ (fooStr)); pragma(msg, "fooStr2: " ~ (fooStr2)); pragma(msg, "fooStr~\" Joe\""~": " ~ (fooStr~" Joe")); template fooTmpl { enum fooTempl = "Hello World"; pragma(msg, "fooTempl:\n" ~ (fooTempl)); }
Compiler Output:
fooStr: Hi fooStr2: Hi2 fooStr~" Joe": Hi Joe fooTempl: Hello World
See Implementation
Compile-time version of traceVal.
Only works for string values right now.
Usage:
Turns Into:
Compiler Output: