|
Boost : |
Subject: Re: [boost] Boost should not be saying "_FPOSOFF"
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-09-26 18:31:13
On 9/26/2016 4:45 PM, alanbirtles2 wrote:
> 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
This explanation is clearer to me than your previous shorthand. Thanks !
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk