This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: hash_map.find() use compiles on 64 bit but not on 32?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]