Skip to content
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

Use hash based IDs for type instead of a pointer to static data #97

Closed
gracicot opened this issue Apr 21, 2020 · 2 comments
Closed

Use hash based IDs for type instead of a pointer to static data #97

gracicot opened this issue Apr 21, 2020 · 2 comments
Milestone

Comments

@gracicot
Copy link
Owner

Is your feature request related to a problem? Please describe.
For type id, we use the address of a static variable. This is a problem. For instance, this can create problems in DLLs (#80) and some compiler can optimize them with the default settings for production build (#96).

Describe the solution you'd like
We should generate a unique hash for each type that is reproducible and stable between compilers and platform. This is possible and proven by TheLartians/StaticTypeInfo

@gracicot gracicot added this to the 4.3 milestone Apr 21, 2020
@gracicot
Copy link
Owner Author

gracicot commented May 5, 2020

The __PRETTY_FUNCTION__ variable cannot be used in constexpr contexton GCC older than version 8. We want to ship but don't want to break so it will be available as an option in the CMake setup.

@gracicot
Copy link
Owner Author

gracicot commented May 5, 2020

Fixed in dev-4.3.x. It can be enabled by passing -DKANGARU_HASH_TYPE_ID=ON on the CMake command line

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

No branches or pull requests

1 participant