1. opCast doesn't do an implict cast. You'll have to cast to
get == to work.
2. If you really have a static opCall, then the new isn't
necessary.
3. You need to return from opCast. You're just declaring a
local variable.
4. You need to import std.traits, or using Unqual will cause
the template
constraint to fail.
- Jonathan M Davis
1. What have i to cast explicit? I thought that does the
overloaded opEquals for me?
2. See my post above.
3. I return with "return U(this.x, this.y);" that is not a local
variable, imo.
4. Of course i import it, but it is implicit import if i import
std.stdio.
Here my total sourc eto avoid misconceptions:
http://codepad.org/fnkyysYu