Strange CTFE issue, string replacement
Jethro via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Apr 9 13:20:55 PDT 2017
On Sunday, 9 April 2017 at 19:55:57 UTC, Stefan Koch wrote:
> On Sunday, 9 April 2017 at 19:38:33 UTC, Jethro wrote:
>> [...]
>
> The constructor is nuts.
> You do not need to zero the string!
>
> Also avoid templates if you can.
Please don't criticize banal stuff by choosing one meaningless
line and calling the whole thing "nuts". It's a waste of time. I
zero'ed it because it helps in debugging and for other errors.(if
used in C terminated like string usage it helps to have the
string actually terminate at some point)
My questions still stand though. Why is it 10x the speed and
memory?!?!
More information about the Digitalmars-d-learn
mailing list