Subject: Re: [boost] Boost should not be saying "_FPOSOFF"
From: alanbirtles2 (alan.birtles_at_[hidden])
Date: 2016-09-26 07:02:53
some context to the use of _FPOSOFF in boost might be useful.
up to and including VS 2015 std::streamoff(std::streampos()) returned _Myoff
there is no other way to retrieve the value of _Myoff from std::streampos.
until VS 2012 _FPOSOFF was a cast to long.
therefore the only way to safely get the stream offset from a std::streampos
was to do:
pos.seekpos + std::streamoff( pos ) - _FPOSOFF( pos.seekpos ) == _Fpos +
_Myoff + _FPOSOFF(_Fpos) - _FPOSOFF( _Fpos ) == _Fpos + _Myoff
after VS 2012 the _FPOSOFF macro is a cast to long long so calling
std::streamoff(std::streampos()) returns the correct value and the above
workaround is no longer necessary
-- View this message in context: http://boost.2283326.n4.nabble.com/Boost-should-not-be-saying-FPOSOFF-tp4687951p4688304.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk