Ok. On Fri, 21 Jan 2011, Andrei Alexandrescu wrote:
> Date: Fri, 21 Jan 2011 18:57:31 -0600 > From: Andrei Alexandrescu <[email protected]> > Reply-To: Discuss the phobos library for D <[email protected]> > To: Discuss the phobos library for D <[email protected]> > Subject: Re: [phobos] phobos commit, revision 2354 > > That's due to replace()'s inability to deal with fixed-size immutable arrays. > I don't want to do surgery on it because I think we need to look for a > principled solution for the future. > > I can't commit d_do_test.d. To make it work, replace envData.sep with > to!string(envData.sep) in lines 132 and 139. > > > Andrei > > On 1/21/11 1:04 PM, Brad Roberts wrote: > > On 1/21/2011 12:39 AM, dsource.org wrote: > > > phobos commit, revision 2354 > > > > > > > > > user: andrei > > > > > > msg: > > > Improvements to replicate(); documented splitter() for strings; renamed > > > replace() in place to replaceInPlace(); removed replace() that takes void* > > > in the last position; moved replace() from string to array and generalized > > > it; attached constraint to functional.not; more cleanup of std.string; > > > improved std.algorithm.util and count to accept ranges; improved > > > constraint in std.algorithm.remove > > > > > > http://www.dsource.org/projects/phobos/changeset/2354 > > > > > > paths changed: > > > U trunk/phobos/std/algorithm.d > > > U trunk/phobos/std/array.d > > > U trunk/phobos/std/functional.d > > > U trunk/phobos/std/path.d > > > U trunk/phobos/std/string.d > > > > Sigh.. since this submit, the dmd test suite has been failing since the > > driver > > no longer builds. > > > > s = replace(s, "/", envData.sep); > > > > d_do_test.d(132): Error: template std.array.replace(R1,R2,R3) if > > (isDynamicArray!(R1)&& isForwardRange!(R2)&& isForwardRange!(R3)) does not > > match any function template declaration > > d_do_test.d(132): Error: template std.array.replace(R1,R2,R3) if > > (isDynamicArray!(R1)&& isForwardRange!(R2)&& isForwardRange!(R3)) cannot > > deduce template function from argument types > > !()(string,string,const(immutable(char)[])) > > > > I tried changing it to: replaceInPlace(s, "/", envData.sep); with no > > improvement. > > > > d_do_test.d(132): Error: template std.array.replaceInPlace(T,Range) if > > (isDynamicArray!(Range)&& is(ElementType!(Range) : T)) does not match any > > function template declaration > > d_do_test.d(132): Error: template std.array.replaceInPlace(T,Range) if > > (isDynamicArray!(Range)&& is(ElementType!(Range) : T)) cannot deduce > > template > > function from argument types !()(string,string,const(immutable(char)[])) > > > > > > _______________________________________________ > > phobos mailing list > > [email protected] > > http://lists.puremagic.com/mailman/listinfo/phobos > _______________________________________________ > phobos mailing list > [email protected] > http://lists.puremagic.com/mailman/listinfo/phobos > _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
