Removed unsigned int self from entity since in c++11 you can compare two
pointers of the same type. From § 5.10 of the C++11 standard: Pointers
of the same type (after pointer conversions) can be compared for
equality. Two pointers of the same type compare equal if and only if
they are both null, both point to the same function, or both represent
the same address (3.9.2).