Skip to content

'_FPOSOFF' has been deprecated, error C3861: '_FPOSOFF': identifier not found #1323

Description

@FrankXie05

I am the maintainer of vcpkg and we found above error when we test this port in an internal version of Visual Studio.

This error due to _FPOSOFF' has been completely deprecated after the standard MSVC-PR-132953 .

For fixing this issue: we think bellow code

std::streamoff offset = pos.operator std::streamoff( ) - _FPOSOFF( position );

could be change to

std::streamoff offset = 0;

Reason:
When pos.operator std::streamoff() is called, the std::streampos object pos is actually converted to the std::streamoff type to obtain its offset in the stream. And _FPOSOFF(position) is to get the offset of the fpos_t object position in the stream.

In this code, the calculate the offset of pos relative to position, but because the definition of _FPOSOFF is no longer available, and since the result of _FPOSOFF(position) is the same as pos.operator std::streamoff().
Related PR:
microsoft/STL#4606
microsoft/vcpkg#38666

If you have other solotions, please ping me. I will apply it to vcpkg for this issue. :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions