Operator overloading problem

Blonder andreas at schniertshauer.de
Fri Aug 6 14:24:27 PDT 2010


Hello,

this seems to work, but if I add the following

	double opBinary(string op, U) (U rhs)
	{
		static if(op == "^" && is(U: Group))
		{
			// do something
			return 42;
		}
	}

because I want to write the following: double d = g^h;
I have the same problem again.

This syntax isn't very intuitive.


More information about the Digitalmars-d-learn mailing list