-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix traits GetUniqueTypeId
#1021
fix traits GetUniqueTypeId
#1021
Conversation
I have seen this coming 😄 Currently you specialize the uint8_t case, which is equal to the base id, to be equal to zero. What is then left of the purpose of the base id subtraction? Could we fully remove this subraction? |
Thanks, though - worked for me! |
f9aab3a
to
6975121
Compare
@BenjaminW3 If have changed the algorithm to create IDs. Now it is a counter based on the some method like before. Every time a compiler sees a new type the id of the base type is incremented and stored in the new type. |
In the current version the |
6975121
to
df98cf0
Compare
I removed the not used includes and add some missing one. |
|
||
#include <sstream> | ||
#include <string> | ||
#include <exception> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing this header in isolation I found that std::runtime_error
is defined in <stdexcept>
and not in <exception>
.
Could you additionally add the missing #include <climits>
for CHAR_BIT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we should add both includes, thx
- getUniqueTypeId with a special environment on hypnos - baseUId is not smallest created id fix: - remove pointer address magic - add base type with static global counter
df98cf0
to
b04502b
Compare
removed bit magic calculation for @ax3l do you know how I can check in which library
|
|
@psychocoderHPC yes it's part of I also have a gist for exactly that question because there is actually a large list which is not header-only. thank you for taking good care when introducing new libraries, perfect! 🚀 |
fix traits `GetUniqueTypeId`
^^ me too. good we added asserts! |
fix:
explicit initialize the baseTypeId
withGetUniqueTypeId<uint8_t>::byte
boost::numeric::bounds
for max value calculationEnvironment:
Tested with: