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

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |WONTFIX

--- Comment #3 from Steven Schveighoffer <[email protected]> ---
a char[] is not a range of char but rather a range of dchar.

Phobos refuses to put into an auto-decode range (the 'front' result of a char[]
is not ref, so cannot be written to).

The solution is to use byCodeUnit:

import std.utf;
auto r = c.byCodeUnit;
r.put('c');

I think there is general agreement that auto-decode strings were a mistake, but
until that decision is changed, this can't be fixed.

--

Reply via email to