Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7077 closed Patches (fixed)

A few trivial 64-bit warning fixes on Windows

Reported by: Luke Elliott <lukester_null@…> 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)

po.patch (6.9 KB ) - added by Luke Elliott <lukester_null@…> 10 years ago.

Download all attachments as: .zip

Change History (6)

by Luke Elliott <lukester_null@…>, 10 years ago

Attachment: po.patch added

comment:1 by Vladimir Prus, 10 years ago

So looks like unsigned and vector::size_type are not longer the same type? Which one is 64-bit now?

comment:2 by anonymous, 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 Vladimir Prus, 10 years ago

Resolution: fixed
Status: newclosed

(In [79283]) Fix warnings on 64-bit systems.

Closes #7077.

comment:4 by Vladimir Prus, 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 lukester_null@…, 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.

Note: See TracTickets for help on using tickets.