#7077 closed Patches (fixed)
A few trivial 64-bit warning fixes on Windows
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.50.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
In case they are of any interest.
Also with 1.50 I found that distance() needed to be std:: scoped in my build. Sadly I've forgotten which platform/compiler that was - I suspect mingw64. Anyway, included in the patch.
Regards
Luke Elliott.
Attachments (1)
Change History (6)
by , 10 years ago
comment:1 by , 10 years ago
comment:2 by , 10 years ago
IIRC unsigned
is 32 bit, std::size_t
and vector::size_type
are unsigned long
, which is 64 bit. It's generally better to use std::size_t
(or vector::size_type
or whatever), unless you have a good reason not to.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 10 years ago
I've actually used std::size_t in one place while applying the patch, but others would require bubbling more changes up the code that I have the time today.
Could you give trunk one more try, in case I've messed up something?
comment:5 by , 10 years ago
Looks good to me, thanks. Only small thing is line 458 of cmdline.cpp looks a bit weird with tab size of 4 (spaces used everywhere else?) if such things bother you...
Regards
Luke.
So looks like unsigned and vector::size_type are not longer the same type? Which one is 64-bit now?