Mir Random [WIP]

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 07:25:29 PST 2016


On Wednesday, 23 November 2016 at 13:41:25 UTC, Andrei 
Alexandrescu wrote:
> An input range can be made noncopyable.
>
> If you implement it as a noncopyable input range, you get a 
> large support network working for you.

struct A
{
	bool empty;
	int front;
	void popFront(){}
	@disable this(this);
}

import std.algorithm;
void f()
{
	A r;
	auto m=r.map!(a=>1);
}

Does this compile for you?


More information about the Digitalmars-d mailing list