Skip to content

Commit

Permalink
Remove _FPOSOFF and non-Standard std::fpos::seekpos() (#4606)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Apr 26, 2024
1 parent a8d4928 commit 7517ee0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 47 deletions.
3 changes: 0 additions & 3 deletions stl/inc/cstdio
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ _STL_DISABLE_CLANG_WARNINGS
#undef putc
#undef putchar

// TRANSITION: Boost nonconformingly uses this macro
#define _FPOSOFF(fp) (static_cast<long long>(fp))

_STD_BEGIN
#pragma warning(push)
#pragma warning(disable : 4995) // name was marked as #pragma deprecated
Expand Down
6 changes: 0 additions & 6 deletions stl/inc/iosfwd
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ public:
return _Myoff + _Fpos;
}

#ifndef _REMOVE_FPOS_SEEKPOS
_DEPRECATE_FPOS_SEEKPOS fpos_t seekpos() const noexcept {
return {};
}
#endif // !defined(_REMOVE_FPOS_SEEKPOS)

_NODISCARD streamoff operator-(const fpos& _Right) const noexcept /* strengthened */ {
return static_cast<streamoff>(*this) - static_cast<streamoff>(_Right);
}
Expand Down
15 changes: 1 addition & 14 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1221,20 +1221,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect

// STL4018 was "The non-Standard std::tr2::sys namespace is deprecated and will be REMOVED."

#ifdef _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING
#define _DEPRECATE_FPOS_SEEKPOS
#else // ^^^ warning disabled / warning enabled vvv
#define _DEPRECATE_FPOS_SEEKPOS \
[[deprecated("warning STL4019: " \
"The member std::fpos::seekpos() is non-Standard, and is preserved only for compatibility with " \
"workarounds for old versions of Visual C++. It will be removed in a future release, and in this " \
"release always returns 0. Please use standards-conforming mechanisms to manipulate fpos, such as " \
"conversions to and from streamoff, or an integral type, instead. If you are receiving this message " \
"while compiling Boost.IOStreams, a fix has been submitted upstream to make Boost use " \
"standards-conforming mechanisms, as it does for other compilers. You can define " \
"_SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING to suppress this warning, " \
"or define _REMOVE_FPOS_SEEKPOS to remove std::fpos::seekpos entirely.")]]
#endif // ^^^ warning enabled ^^^
// STL4019 was "The member std::fpos::seekpos() is non-Standard, and [...] will be removed"

// P0482R6 Library Support For char8_t
// Other C++20 deprecation warnings
Expand Down
1 change: 0 additions & 1 deletion tests/std/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ tests\VSO_0000000_list_unique_self_reference
tests\VSO_0000000_matching_npos_address
tests\VSO_0000000_more_pair_tuple_sfinae
tests\VSO_0000000_nullptr_stream_out
tests\VSO_0000000_oss_workarounds
tests\VSO_0000000_path_stream_parameter
tests\VSO_0000000_regex_interface
tests\VSO_0000000_regex_use
Expand Down
4 changes: 0 additions & 4 deletions tests/std/tests/VSO_0000000_oss_workarounds/env.lst

This file was deleted.

19 changes: 0 additions & 19 deletions tests/std/tests/VSO_0000000_oss_workarounds/test.cpp

This file was deleted.

0 comments on commit 7517ee0

Please sign in to comment.