From 8bf6309de3473fef57727130907e7eb5e00c8022 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 4 Aug 2022 21:05:39 -0700 Subject: [PATCH 1/2] Stop dragging stdext::hash_compare into std. It's been almost 3.5 years. --- stl/inc/xhash | 2 -- 1 file changed, 2 deletions(-) diff --git a/stl/inc/xhash b/stl/inc/xhash index f3ea7f57010..37f6e30ef46 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -88,8 +88,6 @@ namespace stdext { } // namespace stdext _STD_BEGIN -using stdext::hash_compare; // TRANSITION, protobuf used this until v3.7.0, released Feb 28, 2019 - template struct _Uhash_choose_transparency { // transparency selector for non-transparent hashed containers From 65df428464710a0260dd3e70b06dbdee1bbde6c4 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 4 Aug 2022 21:19:41 -0700 Subject: [PATCH 2/2] xhash should include string machinery only when hash_meow is enabled. --- stl/inc/xhash | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stl/inc/xhash b/stl/inc/xhash index 37f6e30ef46..455373f7755 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -9,13 +9,16 @@ #include #if _STL_COMPILER_PREPROCESSOR #include -#include -#include #include #include #include #include + +#ifdef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS +#include +#include #include +#endif // _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS #if _HAS_CXX17 #include @@ -28,6 +31,7 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new +#ifdef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS namespace stdext { using _STD basic_string; using _STD less; @@ -86,6 +90,7 @@ namespace stdext { _Pr comp{}; // the comparator object }; } // namespace stdext +#endif // _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS _STD_BEGIN template