Is this a bug? RandomSample claims it needs input range but actually needs forward range

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Tue Jun 18 20:46:00 PDT 2013


On 06/19/2013 02:56 AM, finalpatch wrote:
> in the declaration of RandomSample it only checks for isInputRange, but in the
> implementation it calls the .save() method which is only available in forward
> ranges.

What compiler and version are you using?  This was reported here:
http://d.puremagic.com/issues/show_bug.cgi?id=10265

... and fixed in this pull request:
https://github.com/D-Programming-Language/phobos/pull/1332


More information about the Digitalmars-d mailing list