Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions stl/inc/__msvc_ostream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,9 @@ class basic_ostream : virtual public basic_ios<_Elem, _Traits> { // control inse
bool _Ok; // true if stream state okay at construction
};

#pragma push_macro("opfx")
#pragma push_macro("osfx")
#undef opfx
#undef osfx
#ifdef _CRTBLD
// TRANSITION, ABI: non-Standard opfx() is preserved for binary compatibility
_DEPRECATE_IO_PFX_SFX bool __CLR_OR_THIS_CALL opfx() { // test stream state and flush tie stream as needed
bool __CLR_OR_THIS_CALL opfx() { // test stream state and flush tie stream as needed
if (!this->good()) {
return false;
}
Expand All @@ -150,11 +147,10 @@ class basic_ostream : virtual public basic_ios<_Elem, _Traits> { // control inse
}

// TRANSITION, ABI: non-Standard osfx() is preserved for binary compatibility
_DEPRECATE_IO_PFX_SFX void __CLR_OR_THIS_CALL osfx() noexcept { // perform any wrapup
void __CLR_OR_THIS_CALL osfx() noexcept { // perform any wrapup
_Osfx();
}
#pragma pop_macro("osfx")
#pragma pop_macro("opfx")
#endif // ^^^ defined(_CRTBLD) ^^^

void __CLR_OR_THIS_CALL _Osfx() noexcept { // perform any wrapup
_TRY_BEGIN
Expand Down
12 changes: 4 additions & 8 deletions stl/inc/istream
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,16 @@ public:
return this->good();
}

#pragma push_macro("ipfx")
#pragma push_macro("isfx")
#undef ipfx
#undef isfx
#ifdef _CRTBLD
// TRANSITION, ABI: non-Standard ipfx() is preserved for binary compatibility
_DEPRECATE_IO_PFX_SFX bool __CLR_OR_THIS_CALL ipfx(bool _Noskip = false) {
bool __CLR_OR_THIS_CALL ipfx(bool _Noskip = false) {
// test stream state and skip whitespace as needed
return _Ipfx(_Noskip);
}

// TRANSITION, ABI: non-Standard isfx() is preserved for binary compatibility
_DEPRECATE_IO_PFX_SFX void __CLR_OR_THIS_CALL isfx() {} // perform any wrapup
#pragma pop_macro("isfx")
#pragma pop_macro("ipfx")
void __CLR_OR_THIS_CALL isfx() {} // perform any wrapup
#endif // ^^^ defined(_CRTBLD) ^^^

#ifdef _M_CEE_PURE
basic_istream& __CLR_OR_THIS_CALL operator>>(basic_istream&(__clrcall* _Pfn)(basic_istream&) ) {
Expand Down
6 changes: 4 additions & 2 deletions stl/inc/xlocale
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,10 @@ public:

static _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL global(const locale&); // current locale

// TRANSITION, ABI: non-Standard empty() is preserved for binary compatibility
_DEPRECATE_LOCALE_EMPTY static _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL empty(); // empty (transparent) locale
#ifdef _CRTBLD
// TRANSITION, ABI: non-Standard locale::empty() is preserved for binary compatibility
static _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL empty();
#endif // ^^^ defined(_CRTBLD) ^^^

private:
struct _Secret_locale_construct_tag {
Expand Down
21 changes: 2 additions & 19 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1477,16 +1477,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect

// STL4044 was "The contents of the stdext::cvt namespace are non-Standard extensions and will be removed"

#if !defined(_SILENCE_IO_PFX_SFX_DEPRECATION_WARNING) && !defined(_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS)
#define _DEPRECATE_IO_PFX_SFX \
[[deprecated( \
"warning STL4045: The ipfx(), isfx(), opfx(), and osfx() functions are removed before C++98 (see WG21-N0794) " \
"but kept as non-Standard extensions. They will be removed in the future, and the member classes sentry " \
"should be used instead. You can define _SILENCE_IO_PFX_SFX_DEPRECATION_WARNING or " \
"_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.")]]
#else // ^^^ warning enabled / warning disabled vvv
#define _DEPRECATE_IO_PFX_SFX
#endif // ^^^ warning disabled ^^^
// STL4045 was "The ipfx(), isfx(), opfx(), and osfx() functions are [...] non-Standard extensions"

// STL4046 was "Non-Standard TR1 components in <random> are deprecated and will be REMOVED."

Expand All @@ -1502,15 +1493,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define _CXX20_DEPRECATE_CODECVT_CHAR8_T_FACETS
#endif // ^^^ warning disabled ^^^

#if !defined(_SILENCE_LOCALE_EMPTY_DEPRECATION_WARNING) && !defined(_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS)
#define _DEPRECATE_LOCALE_EMPTY \
[[deprecated( \
"warning STL4048: locale::empty() is a non-Standard extension and will be removed in the future. A " \
"default-constructed locale can be used instead. You can define _SILENCE_LOCALE_EMPTY_DEPRECATION_WARNING or " \
"_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.")]]
#else // ^^^ warning enabled / warning disabled vvv
#define _DEPRECATE_LOCALE_EMPTY
#endif // ^^^ warning disabled ^^^
// STL4048 was "locale::empty() is a non-Standard extension and will be removed in the future."

// next warning number: STL4049

Expand Down
3 changes: 1 addition & 2 deletions stl/src/locale0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#undef _ENFORCE_ONLY_CORE_HEADERS // TRANSITION, <xfacet> should be a core header

#define _SILENCE_LOCALE_EMPTY_DEPRECATION_WARNING

#include <crtdbg.h>
#include <internal_shared.h>
#include <xatomic.h>
Expand Down Expand Up @@ -157,6 +155,7 @@ _MRTIMP2_PURE const locale& __CLRCALL_PURE_OR_CDECL locale::classic() { // get r
return classic_locale;
}

// TRANSITION, ABI: non-Standard locale::empty() is preserved for binary compatibility
_MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL locale::empty() { // make empty transparent locale
_Init();
return locale{_Secret_locale_construct_tag{}, _Locimp::_New_Locimp(true)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@
#define make_unchecked_array_iterator delete
#define unchecked_array_iterator delete

#define ipfx delete
#define isfx delete
#define opfx delete
#define osfx delete

// Test workaround for extensions of non-reserved names that can't be removed at this moment.
#define raw_name 1001

#define ipfx 1002
#define isfx 1003

#define opfx 1004
#define osfx 1005

// Also test GH-2645: <yvals_core.h>: Conformance issue on [[msvc::known_semantics]]
#define msvc 1
#define known_semantics 2
Expand Down Expand Up @@ -72,19 +71,3 @@
#if raw_name != 1001
#error bad macro expansion
#endif // raw_name != 1001

#if ipfx != 1002
#error bad macro expansion
#endif // ipfx != 1002

#if isfx != 1003
#error bad macro expansion
#endif // isfx != 1003

#if opfx != 1004
#error bad macro expansion
#endif // opfx != 1004

#if osfx != 1005
#error bad macro expansion
#endif // osfx != 1005
Loading