diff libinterp/corefcn/jsonencode.cc @ 28850:445e5ac1f58d

in unwind_action objects, capture variables in lambda expressions when possible Files affected: call-stack.cc, graphics.cc, input.cc, jsonencode.cc, oct-hist.cc, rand.cc, strfns.cc, sysdep.cc, toplev.cc, __delaunayn__.cc, __voronoi__.cc, audiodevinfo.cc, audioread.cc, convhulln.cc, lo-sysdep.cc, oct-glob.cc, oct-string.cc, and url-transfer.cc.
author John W. Eaton <jwe@octave.org>
date Fri, 02 Oct 2020 12:58:12 -0400
parents d28016d16e9a
children 97d8ef9b7348
line wrap: on
line diff
--- a/libinterp/corefcn/jsonencode.cc	Sat Sep 19 12:09:57 2020 +0200
+++ b/libinterp/corefcn/jsonencode.cc	Fri Oct 02 12:58:12 2020 -0400
@@ -411,7 +411,7 @@
     // "Octave:classdef-to-struct" warning and re-enable it.
     {
       octave::unwind_action restore_warning_state
-        ([] (const auto& old_warning_state)
+        ([] (const octave_value_list& old_warning_state)
          {
            set_warning_state (old_warning_state);
          }, set_warning_state ("Octave:classdef-to-struct", "off"));
@@ -422,7 +422,7 @@
   else if (obj.isobject ())
     {
       octave::unwind_action restore_warning_state
-        ([] (const auto& old_warning_state)
+        ([] (const octave_value_list& old_warning_state)
          {
            set_warning_state (old_warning_state);
          }, set_warning_state ("Octave:classdef-to-struct", "off"));