Boost logo

Boost :

Subject: Re: [boost] Boost should not be saying "_FPOSOFF"
From: alanbirtles2 (alan.birtles_at_[hidden])
Date: 2016-09-26 16:45:38


OK, in more detail:
the actual offset in a std::streampos is "_Fpos + _Myoff".
std::streampos::seekpos returns "_Fpos"
std::streamoff(std::streampos) returns "_Myoff + _FPOSOFF(_Fpos)"
to get to the desired "_Fpos + _Myoff" we run:
std::streampos::seekpos() + std::streamoff(std::streampos) - _FPOSOFF(
std::streampos::seekpos() )
which is equivalent to:
_Fpos + std::streamoff(std::streampos) - _FPOSOFF( _Fpos )
which is equivalent to:
_Fpos + _Myoff + _FPOSOFF(_Fpos) - _FPOSOFF( _Fpos )
the two _FPOSOFF(_Fpos) cancel out to leave the desired:
_Fpos + _Myoff

--
View this message in context: http://boost.2283326.n4.nabble.com/Boost-should-not-be-saying-FPOSOFF-tp4687951p4688335.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