[clang] [Clang][Parser] Make 'T...[N]' within a function parameter a valid pack expansion prior to C++2c (PR #116332)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 18 23:47:49 PST 2024


erichkeane wrote:

> @erichkeane Nah, it's technically valid in C++23. There was no deprecate/remove period because how unused/useless that feature is. (just spell it T*)

Ah, oof!  Thank you for clarifying.  That is really unfortunate.  I don't have a great idea on how to handle the transition.  Are we finding that we have uses of this?  If so, there is perhaps value to a warning diagnostic that it is changing (and re-enabling the old behavior?).  Else, I wonder if we are OK being non-conforming in Pre-C++26 mode and just leaving this as an error, despite being valid code.  A diagnostic to say "we know we aren't conforming here, but this changes meaning, so give this an identifier" is perhaps acceptable there? 

I don't have a great idea here as far as what appetite we have for accepting/disallowing the older meaning.

https://github.com/llvm/llvm-project/pull/116332


More information about the cfe-commits mailing list