Yuri Gorobets <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Yuri Gorobets <> 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:

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:
------- You are receiving this mail because: -------

Reply via email to