[Issue 5379] New: std.array.replace fails on char[]s
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 27 00:44:37 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5379
Summary: std.array.replace fails on char[]s
Product: D
Version: D2
Platform: x86
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: oag at optusnet.com.au
--- Comment #0 from Oliver Goodman <oag at optusnet.com.au> 2010-12-27 00:42:34 PST ---
import std.stdio;
import std.array;
void main() {
char[] s = "abcdef".dup;
char[] t = "xxxx".dup;
replace(s, 2, 4, t);
writefln("s = %s", s);
}
/+
Gives me the following compile error:
mymble:d oag$ dmd replace.d
replace.d(7): Error: template std.array.replace(T,Range) if
(is(ElementType!(Range) == T)) does not match any function template declaration
replace.d(7): Error: template std.array.replace(T,Range) if
(is(ElementType!(Range) == T)) cannot deduce template function from argument
types !()(char[],int,int,char[])
It appears to think that ElementType!(char[]) is dchar.
+/
--
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