[Bug c++/92812] Implement P1975R0: Fixing the wording of parenthesized aggregate-initialization

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 21 22:18:42 GMT 2020


--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This should now work too:

  int (&&r)[3] = static_cast<int[3]>(42);
  int (&&r2)[1] = static_cast<int[]>(42);

and in both cases the reference declarations lifetime-extend the array

More information about the Gcc-bugs mailing list