[Issue 24391] New: std.encoding.sanitize should be usable in @safe
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Feb 12 22:20:26 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24391
          Issue ID: 24391
           Summary: std.encoding.sanitize should be usable in @safe
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: forestix at nom.one
The offending line:
> return cast(immutable(E)[])array[0 .. offset];
ldc2 says:
Error: cast from `char[]` to `string` not allowed in safe code
--
    
    
More information about the Digitalmars-d-bugs
mailing list