overloading InExpression

Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 2 07:35:54 PDT 2014


On Wednesday, 2 July 2014 at 14:14:57 UTC, Dicebot wrote:
> struct S
> {
> 	int opIn_r(int key)
> 	{
> 		return key*2;
> 	}
> }
>
> void main()
> {
> 	assert((42 in S.init) == 84);
> }

Thanks! I wonder, why the _r and lack of documentation?


More information about the Digitalmars-d-learn mailing list