aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/protobuf/patches/unaccepted-pr9977-cxx20-keywords.patch
blob: ad049c17c27afa6cb8131037ec4f3f11612eb7e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 43f60b1d59c458749fc947b3c5ddbb36b234d5af Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley@gmail.com>
Date: Mon, 16 May 2022 10:25:38 -0700
Subject: [PATCH] Add new C++ 20 keywords

Discovered in https://github.com/envoyproxy/envoy/issues/21010
---
 src/google/protobuf/compiler/cpp/helpers.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index 4b7c5c9d91..e17cc9c66c 100644
--- a/src/google/protobuf/compiler/cpp/helpers.cc
+++ b/src/google/protobuf/compiler/cpp/helpers.cc
@@ -93,9 +93,12 @@ static const char* const kKeywordList[] = {  //
     "char",
     "class",
     "compl",
+    "concept",
     "const",
-    "constexpr",
     "const_cast",
+    "consteval",
+    "constexpr",
+    "constinit",
     "continue",
     "decltype",
     "default",
@@ -132,6 +135,7 @@ static const char* const kKeywordList[] = {  //
     "public",
     "register",
     "reinterpret_cast",
+    "requires",
     "return",
     "short",
     "signed",