Implicit enum conversions are a stupid PITA
Don
nospam at nospam.com
Thu Mar 25 18:38:53 PDT 2010
bearophile wrote:
> Adam D. Ruppe:
>> Trivial. I'll start with the code you posted on the bugzilla.
>
> It's better to minimize the number of templates created by the code. I have used CTFE here (not much tested):
>
>
> import std.metastrings: toStringNow;
Do NOT use toStringNow. std.metastrings is mostly obsolete -- it
predates CTFE.
CTFE functions are much easier to test than templates, you can use
run-time tests and check code coverage, for example. And the code is
much easier to read.
More information about the Digitalmars-d
mailing list