[Issue 13018] New: std.string.translate needs mutable translation table
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Wed Jul  2 04:26:55 PDT 2014
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13018
          Issue ID: 13018
           Summary: std.string.translate needs mutable translation table
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: japplegame at gmail.com
This code doesn't compile:
import std.string;
immutable dchar[dchar] tt;
shared static this() {
    tt = ['a': '0', 'b': '1'];
}
void main() {
    assert(translate("abc", tt) == "01c");
}
http://dpaste.dzfl.pl/1d4a44b51bb3
--
    
    
More information about the Digitalmars-d-bugs
mailing list