Skip to content

Avoid std::type_info pointer comparison #914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jagerman
Copy link
Member

Type equality needs to be done with operator== on the
std::type_info object; we do this in some places, but in a few places
use pointer equality (i.e. the equivalent of &typeid(A) == &typeid(B)).
This replaces all such cases with std::type_info equality comparisons.

I noticed this in investigation of #912, but it does not fix that issue.

Type equality needs to be done with `operator==` on the
`std::type_info` object; we do this in some places, but in a few places
use pointer equality (i.e. the equivalent of &typeid(A) == &typeid(B)).
This replaces all such cases with std::type_info equality comparisons.
@jagerman
Copy link
Member Author

Closed in favour of #915.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant