Cleanups 8: Deprecate `<strstream>` classes instead of the entire header (#2680)

This commit is contained in:
Stephan T. Lavavej 2022-05-01 03:48:16 -07:00 коммит произвёл GitHub
Родитель 4b3d984c3b
Коммит e9c2444cd4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -35,7 +35,6 @@
#endif // TRANSITION, OS-17090155 (UCRT)
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#define _SILENCE_CXX17_STRSTREAM_DEPRECATION_WARNING
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

Просмотреть файл

@ -18,11 +18,9 @@ _STL_DISABLE_CLANG_WARNINGS
#undef new
_STD_BEGIN
_CXX17_DEPRECATE_STRSTREAM typedef int _Header_strstream;
using _Hdr_strstream = _Header_strstream;
class strstreambuf : public streambuf { // stream buffer associated with static or allocated character array
_STL_DISABLE_DEPRECATED_WARNING
class _CXX17_DEPRECATE_STRSTREAM strstreambuf : public streambuf {
// stream buffer associated with static or allocated character array
public:
using _Mysb = streambuf;
enum { // constants for bits in stream state
@ -423,7 +421,8 @@ inline void swap(strstreambuf& _Left, strstreambuf& _Right) {
_Left.swap(_Right);
}
class istrstream : public istream { // input stream associated with a character array
class _CXX17_DEPRECATE_STRSTREAM istrstream : public istream {
// input stream associated with a character array
public:
using _Mybase = istream;
using _Mysb = strstreambuf;
@ -486,7 +485,8 @@ inline void swap(istrstream& _Left, istrstream& _Right) {
_Left.swap(_Right);
}
class ostrstream : public ostream { // output stream associated with a character array
class _CXX17_DEPRECATE_STRSTREAM ostrstream : public ostream {
// output stream associated with a character array
public:
using _Mybase = ostream;
using _Mysb = strstreambuf;
@ -548,7 +548,8 @@ inline void swap(ostrstream& _Left, ostrstream& _Right) {
_Left.swap(_Right);
}
class strstream : public iostream { // input/output stream associated with character array buffer
class _CXX17_DEPRECATE_STRSTREAM strstream : public iostream {
// input/output stream associated with character array buffer
public:
using _Mybase = iostream;
using _Mysb = strstreambuf;
@ -614,6 +615,7 @@ private:
inline void swap(strstream& _Left, strstream& _Right) {
_Left.swap(_Right);
}
_STL_RESTORE_DEPRECATED_WARNING
_STD_END
#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS

Просмотреть файл

@ -11,7 +11,6 @@
#define _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING
#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING
#define _SILENCE_CXX17_RAW_STORAGE_ITERATOR_DEPRECATION_WARNING
#define _SILENCE_CXX17_STRSTREAM_DEPRECATION_WARNING
#define _SILENCE_CXX17_TEMPORARY_BUFFER_DEPRECATION_WARNING
#define _SILENCE_CXX20_ATOMIC_INIT_DEPRECATION_WARNING
#define _SILENCE_CXX20_CODECVT_FACETS_DEPRECATION_WARNING

Просмотреть файл

@ -71,7 +71,7 @@ PM_CL="/DMEOW_HEADER=stop_token"
PM_CL="/DMEOW_HEADER=streambuf"
PM_CL="/DMEOW_HEADER=string"
PM_CL="/DMEOW_HEADER=string_view"
PM_CL="/DMEOW_HEADER=strstream /D_SILENCE_CXX17_STRSTREAM_DEPRECATION_WARNING"
PM_CL="/DMEOW_HEADER=strstream"
PM_CL="/DMEOW_HEADER=syncstream"
PM_CL="/DMEOW_HEADER=system_error"
PM_CL="/DMEOW_HEADER=thread"