irritating opCmp behaviour for TypeInfo

Thomas Kuehne thomas-dloop at kuehne.cn
Wed Jul 19 12:11:38 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The following isn't exactly a bug - the documentation doesn't state how
TypeInfo objects are compared - but it is an irritating behaviour:

#
# int x;
#
# bool b1 = (typeid(typeof(x)) != typeid(int));
#
# TypeInfo t1 = typeid(typeof(x));
# TypeInfo t2 = typeid(int);
#
# bool b2 = (t1 != t2);
#
# assert(b1 == b2); // FAILS
#

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEvpFeLK5blCcjpWoRAuPhAJ4+NhWzk9wj0PhTl8TG0Frf7u9MsgCgl2BJ
aYNPaKW3fVB71hp64z8z/Dw=
=N9M0
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list