-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use std::type_info::name() for type lookups outside stdlibc++
Using `std::type_info::operator==` fails under libc++ because the .so is loaded with RTLD_LOCAL. libc++ considers types under such .sos distinct, and so comparing typeid() values directly isn't going to work. This adds a custom hasher and equality class for the type lookup maps when not under stdlibc++, and adds a `detail::same_type` function to perform the equality test. It also converts a few pointer arguments to const lvalue references, particularly since doing the pointer comparison wasn't technically valid to being with (though in practice, appeared to work everywhere). This fixes #912.
- Loading branch information
Showing
5 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters