https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57533

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Most of that commit only affects C++20 mode, but it includes:

            * typeck.c (treat_lvalue_as_rvalue_p): Overhaul.

The new treat_lvalue_as_rvalue_p code says:

+  /* if the operand of a throw-expression is a (possibly parenthesized)
+     id-expression that names an implicitly movable entity whose scope does
not
+     extend beyond the compound-statement of the innermost try-block or
+     function-try-block (if any) whose compound-statement or ctor-initializer
+     encloses the throw-expression, */

The "whose scope does not extend" part is what was missing before.

Reply via email to