stuck on opDiv / opBinary

Spacen Jasset via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 30 12:45:37 PDT 2015


On Sunday, 30 August 2015 at 18:12:40 UTC, BBasile wrote:
> On Sunday, 30 August 2015 at 17:02:58 UTC, Spacen Jasset wrote:
>> [...]
>
> try
>
> ---
> Vector3 opBinary(string op)(Vector3 rhs)
> {
>     static if (op =="/"){}
>     else static assert(0, op ~ " not implemented");
> }
> ---
>
> you used the char litteral delims ('') instead of the strings 
> ones ("").

Ah yes, it's didnt' complain. But anyway that was the wrong 
funciton I implemented.

I found the problem. I failed to implement a opDivAssign


More information about the Digitalmars-d-learn mailing list