|
Boost Users : |
Subject: Re: [Boost-users] [unordered_map]: Unexpected exception on value insertion
From: Daniel James (dnljms_at_[hidden])
Date: 2012-08-21 07:19:06
On 21 August 2012 09:47, Johannes Brunen <jbrunen_at_[hidden]> wrote:
>
> Now I have some questions:
> 1. Is it known that this mapping into the realm of 32Bit is happening
> for the above cast operation?
> 2. Is this a compiler bug? The generated assembler code does not allow
> 'safe' casting into 64bit integer?
> 3. Any advice how I should handle this situation?
This is certainly surprising. I'll need to look into it some more, but
the best course is probably to use a different technique for hashing
floats with Visual C++. I'm already directly hashing the binary
representation of floating point numbers on cygwin, so could probably
do the same for Visual C++, it'll also be a bit quicker.
I'm a bit surprised this wasn't caught by the unit tests. Can you try
running the hash unit tests? They're at 'libs/functional/hash/test' -
especially 'hash_float_test.cpp' and 'hash_long_double_test.cpp'.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net