Opened 10 years ago
#7504 new Bugs
boost::interprocess::basic_vectorbuf calls std::char_traits<char>::pbump() with potentially mismatching data type
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
boost::interprocess::basic_vectorbuf::seekoff()
makes a call to base_t::pbump()
, but the datatypes (may) mismatch for the parameter (and do on my system). std::char_traits<char>::pbump()
takes an int
(according to the standard), but basic_vectorbuf()
is passing it a value of type CharTraits::off_type
, which is implementation defined. Since std::char_traits<char>::off_type
is __int64
on my system, I am getting a warning about a conversion from __int64
to int
.
I don't know what the most appropriate solution is (maybe just a static_cast
), but it would be nice to have this resolved so I can get back down to 0 warnings in my codebase.
I am using Visual Studio 2010 and the latest Boost (and I just check svn trunk and it has the same issue). I get this warning when creating a boost::interprocess::basic_vectorstream
like so:
basic_vectorstream<std::vector<char>, std::char_traits<char>> vs;