patch 8.2.4702: C++ scope labels are hard-coded

Problem:    C++ scope labels are hard-coded.
Solution:   Add 'cinscopedecls' to define the labels. (Rom Praschan,
            closes #10109)
diff --git a/src/cindent.c b/src/cindent.c
index ca21c12..a22db95 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -423,20 +423,34 @@
  * Recognize a "public/private/protected" scope declaration label.
  */
     static int
-cin_isscopedecl(char_u *s)
+cin_isscopedecl(char_u *p)
 {
-    int		i;
+    size_t cinsd_len;
+    char_u *cinsd_buf;
+    char_u *cinsd;
+    size_t len;
+    char_u *skip;
+    char_u *s = cin_skipcomment(p);
 
-    s = cin_skipcomment(s);
-    if (STRNCMP(s, "public", 6) == 0)
-	i = 6;
-    else if (STRNCMP(s, "protected", 9) == 0)
-	i = 9;
-    else if (STRNCMP(s, "private", 7) == 0)
-	i = 7;
-    else
-	return FALSE;
-    return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
+    cinsd_len = STRLEN(curbuf->b_p_cinsd) + 1;
+    cinsd_buf = alloc(cinsd_len);
+    if (cinsd_buf != NULL)
+    {
+	for (cinsd = curbuf->b_p_cinsd; *cinsd; )
+	{
+	    len = copy_option_part(&cinsd, cinsd_buf, cinsd_len, ",");
+	    if (STRNCMP(s, cinsd_buf, len) == 0)
+	    {
+		skip = cin_skipcomment(s + len);
+		if (*skip == ':' && skip[1] != ':')
+		    return TRUE;
+	    }
+	}
+
+	vim_free(cinsd_buf);
+    }
+
+    return FALSE;
 }
 
 /*