[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 06:42:06 PST 2024


erichkeane wrote:

> We basically have the following options here:
> 
> 1. Use C++23 semantics in C++23 mode, with a warning.
> 2. Use C++2c semantics in C++23 mode, with a warning.
> 3. Reject the construct with a hard error in C++23 mode.
> 
> (2) and (3) are basically removing the pack expansion parse from the C++23 grammar. Maybe we should ask the committee for a DR number to explicitly bless this approach.

I think the standard has already decided on 3, that this construct is ill-formed in C++23.  I think we should do a warning in C++98->C++20 that this going to break in the future, do an Error in C++23, and do the 'new' behavior in C++26.

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


More information about the cfe-commits mailing list