Mir Random [WIP]

Joseph Rushton Wakeling via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 07:44:10 PST 2016


On Wednesday, 23 November 2016 at 15:25:29 UTC, Kagamin wrote:
> 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?

auto m = (&r).map!(a=>1);

...?  (Untested, but I think it should work.)


More information about the Digitalmars-d mailing list