cstdint.hpp on MSVC inconsitency ?

In cstdint.hpp, the logic is that , if sizeof(long) == 4 then int32_t = long elseif sizeof(int) == 4 then int32_t = int. However, boost::detail::int_least_helper assumes sizeof(long) > sizeof(int). The consequence is that int_t<32>::fast is not the same as int32_t on MSVC while MSVC always garantee that int == long. Is there any rationale we missed or should I try to fix that as it currently prevent nT2 from compiling on MSVC . Regards

In cstdint.hpp, the logic is that , if sizeof(long) == 4 then int32_t = long elseif sizeof(int) == 4 then int32_t = int. However, boost::detail::int_least_helper assumes sizeof(long) > sizeof(int).
The consequence is that int_t<32>::fast is not the same as int32_t on MSVC while MSVC always garantee that int == long.
Is there any rationale we missed or should I try to fix that as it currently prevent nT2 from compiling on MSVC .
I've switched the logic around in Trunk, as it certainly makes sense to do so. However note that in the strictest sense the int#_t typedef's are "unmentionable" types and no assumptions should really be made as to what the underlying type really is. Cheers, John.
participants (2)
-
joel falcou
-
John Maddock