This fixes debbugs #23610.
* lisp/progmodes/cc-langs.el (c-pack-ops, c-pack-key): New
c-lang-defconsts/defvars.
(c-type-decl-prefix-key): Add "..." and "&&" into the C++ version.
* lisp/progmodes/cc-engine.el (c-forward-type): Handle matches of c-pack-key.
(while (cond
((looking-at c-decl-hangon-key)
(c-forward-keyword-clause 1))
+ ((looking-at c-pack-key)
+ (goto-char (match-end 1))
+ (c-forward-syntactic-ws))
((and c-opt-cpp-prefix
(looking-at c-noise-macro-with-parens-name-re))
(c-forward-noise-clause))))
(c-lang-defvar c-stmt-delim-chars-with-comma
(c-lang-const c-stmt-delim-chars-with-comma))
+(c-lang-defconst c-pack-ops
+ "Ops which signal C++11's \"parameter pack\""
+ t nil
+ c++ '("..."))
+(c-lang-defconst c-pack-key
+ t (c-make-keywords-re 'appendable (c-lang-const c-pack-ops)))
+(c-lang-defvar c-pack-key (c-lang-const c-pack-key))
+
(c-lang-defconst c-auto-ops
;; Ops which signal C++11's new auto uses.
t nil
"\\)"
"\\([^=]\\|$\\)")
c++ (concat "\\("
+ "&&"
+ "\\|"
+ "\\.\\.\\."
+ "\\|"
"[*(&]"
"\\|"
(c-lang-const c-type-decl-prefix-key)