[phobos] phobos commit, revision 2354

Andrei Alexandrescu andrei at erdani.com
Fri Jan 21 16:57:31 PST 2011


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
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list