[Issue 6191] New: removechars doesn't accept a const string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 21 11:00:50 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6191

           Summary: removechars doesn't accept a const string
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-06-21 10:56:03 PDT ---
DMD 2.053:

import std.string;
void main() {
    const string s = "foo5x";
    auto s2 = removechars(s, "^A-Z");
}


test.d(4): Error: template std.string.removechars(S) if (isSomeString!(S)) does
not match any function template declaration
test.d(4): Error: template std.string.removechars(S) if (isSomeString!(S))
cannot deduce template function from argument types
!()(const(immutable(char)[]),string)


(Additionally, removechars is not pure nothrow.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list