www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18209] New: std.uni.byGrapheme is not usable in CTFE

https://issues.dlang.org/show_bug.cgi?id=18209

          Issue ID: 18209
           Summary: std.uni.byGrapheme is not usable in CTFE
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: CTFE
          Severity: blocker
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com
            Blocks: 18205

test case:

```
import std.uni : byGrapheme;
import std.range.primitives : walkLength;

enum a = "a".byGrapheme.walkLength;

void main(){}
```

std/uni.d(7631,16): Error: reinterpretation through overlapped field slen_ is
not allowed in CTFE


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=18205
[Issue 18205] Format string with width specification doesn't work with
multibyte characters
--
Jan 08