updated mir interface

Alex sascha.orlov at gmail.com
Wed Nov 7 14:46:17 UTC 2018


On Wednesday, 7 November 2018 at 14:07:32 UTC, 9il wrote:
> This is a regression. It is fixed in mir-random v2.1.2.

Thanks. But I have another one:

´´´
import mir.random.algorithm;
import std.experimental.all;

void main()
{
	S[] arr;
	arr.length = 42;
	arr.each!((i, ref el) => el.i = i);
	auto res = rne.sample(arr.map!((ref el) => el.i), 1);
}

struct S { size_t i; }
´´´

Does not depend, on whether I use (ref el) or just el... And 
should not depend on that ;)


More information about the Digitalmars-d-learn mailing list