"for" statement issue

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 21 07:28:25 PDT 2016


On Friday, 21 October 2016 at 14:16:26 UTC, Steven Schveighoffer 
wrote:
> How about in general forbidding lambda statements that aren't 
> called or used anywhere?

How?

int main()
{
	int a;
	auto b = ()=>{a++;};
	b();
	assert(a==1);
	return 0;
}


More information about the Digitalmars-d mailing list