Upgrade db to compile with v145 by default - #5
Conversation
|
Thanks, this looks good to me!
I don't think there is a bug. The hash function only decides which bucket an element should be inserted into, not whether an element already exists in the set. As per cppreference.com:
|
…k (for v145 compatible versions
There was a problem hiding this comment.
Looks good, but the registry needs to be configured back to carbonengine/vcpkg-registry. Additionally, I suggest a squash & merge strategy for this PR given that the changes are not particularly atomic and it's not healthy for the historic continuity of the component to have changes such as what's been applied to the vcpkg configuration to persist in history.
|
Good idea with the squash and merge, and yes as soon as we're ready to merge the toolchain updates, I shall be changing the vcpkg-configuration back to carbonengine/vcpkg-registry 👍 |
Configuration Changes
Code Changes
0from aPyObject*type function is now a compilation error, these have been replaced withnullptrreturns.typedefs have been replaced withusing, however this was just a matter of taste,using X = Yis more modern, and easier to read (in my humble opinion 🙇) thantypedef Y Xhash_setthis has been removed from the latest version of the MSVC toolchain, and so needed to be replaced. It's been replaced with a standardunordered_set.hash_setwithunordered_setrequired exposing the hash function forInternalStoreElement, so that it could be used in functor templatesstruct std::hash<WStringStoreElement>,std::hash<ByteStoreElement>&std::hash<StringStoreElement>.Note
There seems to be a bug, both in the old & new versions of the code, where if you try to insert a >64 bytes string into the store that has an identical first 64 bytes as a different string already inside the string store, the store will treat it as an identical string, and the string store will not store both strings. This may not be a bug if DB stringStore does not support strings longer than 64 bytes. If for say the store is only responsible for column names for example🤷.
This requires more investigation, but this v145 upgrade work does not affect this bug