15 lines
846 B
Diff
15 lines
846 B
Diff
|
diff --git a/third_party/protobuf/src/google/protobuf/generated_message_table_driven.h b/third_party/protobuf/src/google/protobuf/generated_message_table_driven.h
|
||
|
index 557c57d35cb4..5fa041612a0b 100644
|
||
|
--- a/third_party/protobuf/src/google/protobuf/generated_message_table_driven.h
|
||
|
+++ b/third_party/protobuf/src/google/protobuf/generated_message_table_driven.h
|
||
|
@@ -39,7 +39,8 @@
|
||
|
// We require C++11 and Clang to use constexpr for variables, as GCC 4.8
|
||
|
// requires constexpr to be consistent between declarations of variables
|
||
|
// unnecessarily (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58541).
|
||
|
-#ifdef __clang__
|
||
|
+// VS 2017 Update 3 also supports this usage of constexpr.
|
||
|
+#if defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1911)
|
||
|
#define PROTOBUF_CONSTEXPR_VAR constexpr
|
||
|
#else // !__clang__
|
||
|
#define PROTOBUF_CONSTEXPR_VAR
|