Opened 11 years ago

Closed 11 years ago

#6290 closed Patches (fixed)

Fix Lexical Cast 64bit Warning

Reported by: Matthew Bradbury <matt-bradbury@…> Owned by: nasonov
Milestone: To Be Determined Component: lexical_cast
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

In Lexical Cast a std::string::size_type is assigned to an unsigned int. This patch changes the unsigned int to also be a std::string::size_type, getting rid of the warning on MSVC11.

Attachments (1)

lexical_cast-fix-64-bit-warning.patch (639 bytes ) - added by Matthew Bradbury <matt-bradbury@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

by Matthew Bradbury <matt-bradbury@…>, 11 years ago

comment:1 by albert.santoni@…, 11 years ago

Nice, beat me to it by 3 days. :)

We just stumbled across the same warning and the same fix, so it looks OK to me FWIW.

I believe the patch you've attached will also fix a size_t/unsigned int comparison warning in the case that BOOST_LEXICAL_CAST_ASSUME_C_LOCALE is not defined on 64-bit systems as well.

comment:2 by Antony Polukhin, 11 years ago

Resolution: fixed
Status: newclosed

(In [76154]) Fixes #6290 Tiny documentation update Updated char16_t and char32_t support (still some work required) lexical_cast_empty_input_test.cpp refactored

Note: See TracTickets for help on using tickets.