Re: [PATCH] c++: new-expr of array of deduced class tmpl [PR101988]

2022-01-26 Thread Jason Merrill via Gcc-patches
On 1/26/22 18:55, Marek Polacek wrote: In r12-1933 I attempted to implement DR2397 aka allowing int a[3]; auto (&r)[3] = a; by removing the type_uses_auto check in create_array_type_for_decl. That may have gone too far, because it also allows arrays of CLASS_PLACEHOLDER_TEMPLATE and it lo

[PATCH] c++: new-expr of array of deduced class tmpl [PR101988]

2022-01-26 Thread Marek Polacek via Gcc-patches
In r12-1933 I attempted to implement DR2397 aka allowing int a[3]; auto (&r)[3] = a; by removing the type_uses_auto check in create_array_type_for_decl. That may have gone too far, because it also allows arrays of CLASS_PLACEHOLDER_TEMPLATE and it looks like [dcl.type.class.deduct] prohibits