On May 28, 11 02:05, Vladimir Panteleev wrote:
Why hasLength!string is false:
https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/std/range.d#L767


Would it make sense to introduce a hasOpaqueLength oslt. to fix this?


You mean std.array.join? The 2-argument overload has specialization for strings (https://github.com/D-Programming-Language/phobos/blob/master/std/array.d#L966).

    static if (isForwardRange!RoR && hasLength!RoR
&& (hasLength!(ElementType!RoR) || isSomeString!(ElementType!RoR)) // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            && hasLength!R)

It doesn't exist for the 1-argument overload though.

Reply via email to