Mercurial > octave
diff liboctave/system/lo-sysdep.cc @ 33034:49128bdb9eb2
use explicit lambda-expression captures (bug #65318)
Previously, we recommended using implicit capture by value (if
possible) in all lambda expressions in Octave. However, this choice
causes trouble in the transition period leading up to C++20, when the
meaning changes for capturing 'this' by reference when the default
capture is '='. Since all lambda expressions in Octave only need to
capture a few variables it seems better and relatively easy to simply
name all captured variable explicitly. (The maximum number of
captured variables currently appears to be seven, including 'this',
but the vast majority are capturing just one or two.)
Affected files: Canvas.cc, GLCanvas.cc, QTerminal.cc,
command-widget.cc, documentation.cc, files-dock-widget.cc,
interpreter-qobject.cc, file-editor-tab.cc, file-editor.cc,
octave-qscintilla.cc, main-window.cc, octave-dock-widget.cc,
octave-qobject.cc, set-path-model.cc, settings-dialog.cc,
variable-editor-model.cc, variable-editor.cc, call-stack.cc,
gl2ps-print.cc, graphics.cc, input.cc, interpreter.cc, load-path.cc,
mex.cc, pr-output.cc, strfns.cc, sysdep.cc, __delaunayn__.cc,
audiodevinfo.cc, audioread.cc, oct-parse.yy, pt-eval.cc,
Array-util.cc, Range.h, lo-sysdep.cc, lo-regexp.cc, oct-glob.cc,
oct-string.cc, and url-transfer.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Feb 2024 14:42:54 -0500 |
parents | 2e484f9f1f18 |
children | 5b54c2fb69bb |
line wrap: on
line diff