Compile time string parse

Paolo Invernizzi arathorn at fastwebnet.iit
Tue Mar 17 07:54:37 PDT 2009


Hi all,
Someone can point me to a way of doing something like this with DMD 2.026:

class A {
    invariant(int) rev = std.conv.to!(int)("$Rev: 182 $");
}

I've messed up with metastrings and std.conv, but I cannot find a working way.

Cheers, Paolo


More information about the Digitalmars-d-learn mailing list