Boost logo

Boost Users :

Subject: Re: [Boost-users] [numeric_cast] Warning with MSVC
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2009-07-17 04:54:34


On Thu, 16 Jul 2009 11:18:26 -0500, Zachary Turner wrote:

> On Thu, Jul 16, 2009 at 8:29 AM, Andrew
> Holden<aholden_at_[hidden]> wrote:
>> Alexander Lamaison wrote:
>> Sent: Thursday, July 16, 2009 6:09 AM
>>> MSVC still gives me a warning about possible loss of data:
>>>
>>>  c:\program files\boost\boost_1_38\boost\numeric\conversion\
>>>  cast.hpp(41) : warning C4267: 'argument' : conversion from 'size_t'
>>>  to 'unsigned int', possible loss of data

>> The issue is a compiler option called "detect 64-bit portability issues"
>> or "/Wp64".  As it is both non-standard and a rather brutal hack, there
>> is probably no way for Boost to support it.
>>
>> I would recommend turning that option off.
>
> For what it's worth, this compiler option is deprecated in recent
> versions of MSVC, so that adds one more to the list of reasons to
> disable the option.

Not the first time this flag has given me trouble. I one had "conversion
from 'size_t' to 'size_t', possible loss of data". Mint.

Turning it off immediately.

Alex


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