DConf '22: No-Allocated 0-terminated path strings

ag0aep6g anonymous at example.com
Fri Oct 21 14:34:47 UTC 2022


On Friday, 21 October 2022 at 13:49:01 UTC, cc wrote:
> ```d
> //version=AllowMalloc;
> auto toCStringThen(alias dg, Range)(Range src) /*nothrow*/ if 
> (isInputRange!Range && !isInfinite!Range) {
> ```
[...]
> May need to be cleaned up for character types and needs to 
> iterate twice if allocations are going to be allowed

Nitpick: You cannot iterate a true input range twice. You need a 
forward range for that.


More information about the Digitalmars-d-learn mailing list