Reputation: 887
I use std::hash for unordered datastructure and save these in ROM. I have to correct use it on x86 and x64 OS. Does it possibly to get equal values for std::hash on x86/x64 os versions?
Upvotes: 0
Views: 93
Reputation: 69902
No. The hash value is not designed to be communicated or stored outside one run of the program.
There is nothing in the standard to prevent it producing a different value on a subsequent run, and certainly no guarantee that it will have the same value on another architecture.
Upvotes: 2