Trying to alias this a grapheme range + making it a forward range

aliak something at something.com
Tue Jul 9 09:12:56 UTC 2019


On Monday, 8 July 2019 at 23:01:49 UTC, ag0aep6g wrote:
> On 08.07.19 23:55, aliak wrote:
>> [...]
>
> `source.front` is a temporary `Grapheme` and you're calling 
> `opSlice` on it. The documentation for `Grapheme.opSlice` 
> warns: "Invalidates when this Grapheme leaves the scope, 
> attempts to use it then would lead to memory corruption." [1]

Ah. Right. Thanks!

>
> [...]

hah yes, I realized this as well.

>
> [...]

No you're right. It was indeed just making things more 
complicated and was just a bad idea.

>
> [...]

Cheers,
- Ali


More information about the Digitalmars-d-learn mailing list