traceValCT

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
  1. template traceValCT(values...)
    template traceValCT (
    values...
    ) {}
  2. template traceValCT(bool useNewline, values...)

Members

Manifest constants

traceValCT
enum traceValCT;
Undocumented in source.

Meta