Opened 13 years ago
Closed 13 years ago
#4055 closed Bugs (fixed)
msvc C4244 warning in boost/iostreams/detail/buffer.hpp(151).
Reported by: | Owned by: | Daniel James | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | iostreams |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: | k.kowaliczek@… |
Description
hi,
the boost.iostream compilation with stlport-5.2.1 produces a warning:
boost_1_42_0/boost/iostreams/detail/buffer.hpp(151) : warning C4244: 'argument' : conversion from 'stlp_std::streamsize' to 'stlp_std::allocator<_Tp>::size_type', possible loss of data
the streamsize definition from preprocessed stlport char_traits:
//The Win32 file io API support 64 bits access so streamoff and streamsize //has to reflect that. Do not change the stringbuf behavior. typedef __int64 streamoff; typedef streamoff streamsize;
passing int64 data for size_t argument on win32 doesn't look good.
Change History (3)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
you can use an explicit static_cast<std::size_t>(size_) or #pragma warning disable/default.
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I think this was fixed in [61208].
Note:
See TracTickets
for help on using tickets.
I don't think it's going to overflow, since
size_
is always set from anint
(which probably should bestd::size_t
, orallocator::size_type
but I'm not going to change that, as I don't want to change the interface). But I'll look into fixing the warning.