[phobos] phobos commit, revision 1860

Andrei Alexandrescu andrei at erdani.com
Fri Oct 1 23:38:30 PDT 2010


I think we need to change this. The fix reveals a larger underlying 
issue: narrow strings (UTF8 and UTF16) should NOT yield true from 
hasSlicing.

The reason is that hasSlicing has a specific contract associated with 
it: algorithms assume that range[a .. b] yields elements of range from 
the a'th up to and excluding the b'th.

That's not the case for string and wstring. They do implement slicing 
but with a semantics specific to strings.


Correct?

Andrei

On 8/14/10 19:17 PDT, dsource.org wrote:
> phobos commit, revision 1860
>
>
> user: dsimcha
>
> msg:
> Bug 4345:  std.range.take!string: "Nonsensical finite range with slicing but no length"
>
> http://www.dsource.org/projects/phobos/changeset/1860
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list