Imcompatible type, const and const

Duarte xporg.roso at gmail.com
Sun Mar 9 10:38:14 PDT 2014


On Sunday, 9 March 2014 at 16:56:52 UTC, Duarte wrote:
> I don't know how I ended up in D.ide...
>
> I did not copy all the code, because it didn't matter in this 
> case. The path that returns nothing is actually a:
> static if(op == "-")
> {
>     ...
> }
> else
> {
>     static assert(...)
> }
>
> Which hopefully won't compile if the operation is not supported.

Hmm
Vector2 vec = cast(Point2)this - cast(Point2)_right
does the trick. But I can't help to feel this is a ugly 
hack/workaround to a problem elsewhere...


More information about the Digitalmars-d-ide mailing list