On 9/6/2016 2:49 PM, Daniel James wrote:
On 6 September 2016 at 19:24, Stephan T. Lavavej
wrote: [Rob Stewart]
Can you tell us what change can be made to the code to effect what had been gained by using that macro?
It's unconditionally:
#define _FPOSOFF(fp) ((long long)(fp))
So you should be able to replace it with a static_cast, or eliminate it entirely.
That might break older versions, or other uses of Dinkumware. I would try changing this configuration file so that it only applies to old versions:
https://github.com/boostorg/iostreams/blob/develop/include/boost/iostreams/d...
I don't have access to Visual C++ so I can't do it myself. If anyone wants to, all the relevant code is here:
https://github.com/boostorg/iostreams/blob/develop/include/boost/iostreams/p...
The best way for iostreams seems to be to create and use its own macro, equivalent to _FPOSOFF(fp), for older versions of VC++ but hardcodes as '((long long)(fp))' for VC++14 on up. This would allow Microsoft to remove it in future versions of VC++ without affecting iostreams. I assume Microsoft will not be retroactively removing for older versions of VC++ prior to VC++14, even if it is an implementation detail. If iostreams is not currently under CMT, if you add it as a CMT library I will make the appropriate change and test it out. This won't get in 1.62 but should be in the next release after that.