Is it safe to use 'is' to compare types?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 3 15:51:16 PST 2016


On Thursday, 3 March 2016 at 23:46:50 UTC, Yuxuan Shui wrote:
> Will typeid(a) is typeid(b) yield different results than 
> typeid(a) == typeid(b)?

No. Indeed, opEquals on TypeInfo just calls is itself.


More information about the Digitalmars-d-learn mailing list