Autodecode in the wild and An Awful Hack to std.regex

Lodovico Giaretta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 28 02:38:38 PDT 2016


On Thursday, 28 July 2016 at 09:10:33 UTC, Kagamin wrote:
> Create an RFE? Given that regex returns results as slices of 
> the input string, using the replacement character doesn't 
> introduce data corruption.

(RFE = Request For Enhancement, right?)
Yes, all algorithms that use decode internally shall provide a 
template parameter to useReplacementDchar. There's no reason not 
to expose this option, given that it allows not to brutally abort 
any computation in such situations, and also has the bonus point 
of making decode @nogc.


More information about the Digitalmars-d-learn mailing list