From ef76e767be2c03ded0eef10cdd4b341f16ecefdf Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 11 Aug 2022 15:30:55 -0700 Subject: [PATCH 1/2] Add `std::hash_compare` to the GH 2996 escape hatch. --- stl/inc/xhash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stl/inc/xhash b/stl/inc/xhash index 215bfc0398d..e19dcfed5aa 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -90,6 +90,11 @@ namespace stdext { _Pr comp{}; // the comparator object }; } // namespace stdext + +_STD_BEGIN +using stdext::hash_compare; // Non-Standard, for legacy source compatibility +_STD_END + #endif // _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS _STD_BEGIN From 9a3975da216728886c3881eaa4097abcae1df605 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 11 Aug 2022 15:31:26 -0700 Subject: [PATCH 2/2] Add escape hatch for GH 2998. --- stl/inc/functional | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stl/inc/functional b/stl/inc/functional index 2fe8045c3d2..3a5cc809e23 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -14,6 +14,9 @@ #include #include #if _HAS_CXX17 +#ifdef _LEGACY_CODE_ASSUMES_FUNCTIONAL_INCLUDES_MEMORY +#include +#endif // _LEGACY_CODE_ASSUMES_FUNCTIONAL_INCLUDES_MEMORY #include #endif // _HAS_CXX17 #ifdef __cpp_lib_concepts