opCall() @property

Zhenya zheny at list.ru
Fri Jun 29 12:08:05 PDT 2012


struct X
{
	bool _x;
	A opCall(bool x) @property {_x = x;return this;}
}

void main()
{
	X a;
	x = false;//the same that x.opCall(false)?
}

I thought that I could replace these opAssign, but the compiler 
does not agree with me.
But why?


More information about the Digitalmars-d-learn mailing list