Is it possible to override the behavior of a type when used in a conditional expression?

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 12 10:40:09 PDT 2016


On 9/10/16 6:47 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
>
> No. That's how it's been for years now - certainly well before TDPL was
> released - and I suspect that it was that way in D1 (though I've never
> really used D1, so I'm not sure).

It's not that way in D1. I think it was added around the time operator 
overloads were changed to templates.

Combined with changelog search and this hint, I think this is correct:

https://github.com/dlang/dlang.org/commit/b60bf3881ccad5e09cfb6e773c3927637ecca70c#diff-87ae512b433ac9f86b715f03fa17cb0e

Version 2.041 added it.

-Steve


More information about the Digitalmars-d-learn mailing list