http://d.puremagic.com/issues/show_bug.cgi?id=6547
Yuri Gorobets <yuri.gorob...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yuri.gorob...@gmail.com --- Comment #1 from Yuri Gorobets <yuri.gorob...@gmail.com> 2012-02-16 03:25:32 PST --- (In reply to comment #0) This behavior appears to be as designed. The compilation problem is caused by special treatment of the "narrow strings" by std.array: http://dlang.org/glossary.html#narrow%20strings import std.array; import std.algorithm; void main() { char[] s = "narrow".dup; s.remove(0); // Error: template std.algorithm.move(T) // does not match any function template declaration // Error: template std.algorithm.move(T) cannot deduce // template function from argument types !()(dchar,dchar) // remove troubles are caused by the special treatment of narrow strings // front(s) doesn't return a char reference but dchar value instead: s.front = 'c'; // Error: s.front is not an lvalue } dchar version works fine: void main() { dchar[] u = "unicode"d.dup; u.remove(0); // works fine u.front = 'c'; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------