hash_map.find() use compiles on 64 bit but not on 32?
Paolo Carlini
paolo.carlini@oracle.com
Sun Dec 14 09:09:00 GMT 2008
oleg wrote:
> the code included below seems to compile fine with gcc 4.1.2 on centos
> 5.2 on a 64 bit system. it fails to compile on a more or less
> identical 32 bit bit system. using map instead of hash_map allows it
> to work on both build platforms, but i'd rather use hash_map.
The error is simply due to the fact that the legacy hashed containers do
not provide an hashing function for int64_t, long long for your 32 bit
target. You can either provide it yourself, or move your code to the new
unordered containers, delivered as part of recent GCCs (4.3.x is the
current release branch, with 4.4.0 very close).
Paolo.
More information about the Libstdc++
mailing list