From ac0770fbbc73a5baeb528a058b16bb86dc6b8877 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Wed, 7 Dec 2022 13:08:13 -0600 Subject: [PATCH] kitbash protobuf into compiling --- depends/protobuf/google/protobuf/stubs/hash.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/depends/protobuf/google/protobuf/stubs/hash.h b/depends/protobuf/google/protobuf/stubs/hash.h index b4b2da574..2018c121e 100644 --- a/depends/protobuf/google/protobuf/stubs/hash.h +++ b/depends/protobuf/google/protobuf/stubs/hash.h @@ -104,7 +104,14 @@ // And.. they are moved back to stdext in MSVC 2013 (haven't checked 2012). That // said, use unordered_map for MSVC 2010 and beyond is our safest bet. #elif defined(_MSC_VER) -# if _MSC_VER >= 1600 // Since Visual Studio 2010 +# if _MSC_VER >= 1900 // Since Visual Studio 2019 +# define GOOGLE_PROTOBUF_HASH_NAMESPACE std +# include +# define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map +# include +# define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set + +# elif _MSC_VER >= 1600 // Since Visual Studio 2010 # define GOOGLE_PROTOBUF_HAS_CXX11_HASH # define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare # elif _MSC_VER >= 1500 // Since Visual Studio 2008 @@ -233,7 +240,7 @@ namespace google { HashFcn hash_function() const { return HashFcn(); } }; -#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION) +#elif defined(_MSC_VER) && _MSC_VER < 1900 && !defined(_STLPORT_VERSION) template struct hash : public GOOGLE_PROTOBUF_HASH_COMPARE {