Check whether a range is empty

vino.B bheeman.vino at hotmail.com
Sun Jul 15 12:56:40 UTC 2018


On Sunday, 15 July 2018 at 12:18:27 UTC, Steven Schveighoffer 
wrote:
> On 7/15/18 7:45 AM, vino.B wrote:
>> [...]
>
> I still don't know why you are using chain here as it equates 
> to the identity function in this instance:
> https://github.com/dlang/phobos/blob/3d41721141f31059ca6e77dec2da390fad737955/std/range/package.d#L900
>
>>  [...]
>
> So I'm assuming from your assertion that this works, that the 
> range is not empty, but yields no elements when it's iterated? 
> Seems like a bug to me.
>
> -Steve

Hi Steve,

  Initially i thought the using "chain" it will merge several 
ranges for arrays into single range of array, but it doesn't 
merge into single range of array so i have removed the same from 
my code.


From,
Vino.B


More information about the Digitalmars-d-learn mailing list