Implicit enum conversions are a stupid PITA
Don
nospam at nospam.com
Thu Mar 25 18:53:58 PDT 2010
Adam D. Ruppe wrote:
> On Fri, Mar 26, 2010 at 02:38:53AM +0100, Don wrote:
>> Do NOT use toStringNow. std.metastrings is mostly obsolete -- it
>> predates CTFE.
>
> All I wanted there was a quick conversion. At first, I wrote
>
> octal!(to!string(my_integer));
>
> but it didn't compile...
>
> In any case, redoing it is simple enough, but if you don't want people
> using the solution in the library, it should at least be marked in the
> docs.
>
That reply was to bearophile, who said he was minimizing the number of
templates. But since he was using toStringNow, the code created a huge
number of templates.
More information about the Digitalmars-d
mailing list