Mercurial > octave
changeset 31837:febd82d1a8de
use new macros to consistently delete copy and move member functions
Use new OCTAVE_DISABLE_COPY_MOVE macro to consistently disable copy
and move constructors and assignment operators. Consistently declare
deleted functions in public class sections.
Affected files: dw-main-window.h, gui-preferences.h, gui-settings.h,
qt-application.h, qt-interpreter-events.h, variable-editor-model.cc,
variable-editor-model.h, variable-editor.h, base-text-renderer.h,
c-file-ptr-stream.h, dynamic-ld.h, error.h, event-manager.h,
event-queue.h, fcn-info.h, ft-text-renderer.cc, gl-render.cc,
gl-render.h, graphics.cc, graphics.in.h, gzfstream.h, interpreter.cc,
interpreter.h, load-path.h, load-save.h, mex.cc, mxarray.h,
oct-fstrm.h, oct-hist.h, oct-iostrm.h, oct-prcstrm.h, oct-procbuf.h,
oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, pager.h,
settings.h, stack-frame.cc, symscope.h, symtab.h, text-renderer.h,
url-handle-manager.h, __init_fltk__.cc, gzip.cc, cdef-class.cc,
cdef-manager.h, ov-builtin.h, ov-class.cc, ov-classdef.h,
ov-dld-fcn.h, ov-fcn.h, ov-mex-fcn.h, ov-typeinfo.h, ov-usr-fcn.h,
octave.h, anon-fcn-validator.h, lex.h, oct-parse.yy, parse.h,
profiler.h, pt-anon-scopes.h, pt-arg-list.h, pt-args-block.h,
pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cbinop.h,
pt-cell.h, pt-check.h, pt-classdef.h, pt-cmd.h, pt-colon.h,
pt-const.h, pt-decl.h, pt-eval.h, pt-except.h, pt-exp.h,
pt-fcn-handle.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h,
pt-misc.h, pt-pr-code.h, pt-select.h, pt-spmd.h, pt-stmt.h,
pt-tm-const.h, pt-unop.h, pt-walk.h, pt.h, token.h, Array-base.cc,
idx-vector.h, oct-fftw.h, sparse-chol.cc, sparse-qr.cc, oct-env.h,
action-container.h, cmd-edit.cc, cmd-edit.h, cmd-hist.h, oct-mutex.h,
oct-refcount.h, oct-shlib.cc, oct-sort.h, oct-string.h,
singleton-cleanup.h, unwind-prot.h, url-transfer.cc, and
url-transfer.h.
line wrap: on
line diff
--- a/libgui/src/dw-main-window.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/dw-main-window.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_dw_main_window_h) #define octave_dw_main_window_h 1 +#include "octave-config.h" + #include <QMainWindow> OCTAVE_BEGIN_NAMESPACE(octave) @@ -40,11 +42,7 @@ ~dw_main_window () = default; - // No copying! - - dw_main_window (const dw_main_window&) = delete; - - dw_main_window& operator = (const dw_main_window&) = delete; + OCTAVE_DISABLE_COPY_MOVE (dw_main_window) public slots:
--- a/libgui/src/gui-preferences.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/gui-preferences.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_gui_preferences_h) #define octave_gui_preferences_h 1 +#include "octave-config.h" + #include <QStringList> #include <QStyle> #include <QTabWidget> @@ -86,12 +88,7 @@ all_gui_preferences () = default; - // No copying! - - all_gui_preferences (const all_gui_preferences&) = delete; - - all_gui_preferences& - operator = (const all_gui_preferences&) = delete; + OCTAVE_DISABLE_COPY_MOVE (all_gui_preferences) ~all_gui_preferences () = default; @@ -186,12 +183,7 @@ all_shortcut_preferences () = default; - // No copying! - - all_shortcut_preferences (const all_shortcut_preferences&) = delete; - - all_shortcut_preferences& - operator = (const all_shortcut_preferences&) = delete; + OCTAVE_DISABLE_COPY_MOVE (all_shortcut_preferences) ~all_shortcut_preferences () = default;
--- a/libgui/src/gui-settings.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/gui-settings.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_gui_settings_h) #define octave_gui_settings_h 1 +#include "octave-config.h" + #include <QColor> #include <QSettings> #include <QString> @@ -69,11 +71,7 @@ : QSettings (format, scope, organization, application, parent) { } - // No copying! - - gui_settings (const gui_settings&) = delete; - - gui_settings& operator = (const gui_settings&) = delete; + OCTAVE_DISABLE_COPY_MOVE (gui_settings) ~gui_settings () = default;
--- a/libgui/src/qt-application.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/qt-application.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_qt_application_h) #define octave_qt_application_h 1 +#include "octave-config.h" + #include <string> #include "octave.h" @@ -54,11 +56,7 @@ qt_application (int argc, char **argv); - // No copying, at least not yet. - - qt_application (const qt_application&) = delete; - - qt_application& operator = (const qt_application&) = delete; + OCTAVE_DISABLE_COPY_MOVE (qt_application) ~qt_application () = default;
--- a/libgui/src/qt-interpreter-events.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/qt-interpreter-events.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_qt_interpreter_events_h) #define octave_qt_interpreter_events_h 1 +#include "octave-config.h" + #include <list> #include <string> @@ -72,11 +74,7 @@ qt_interpreter_events (base_qobject& oct_qobj); - // No copying! - - qt_interpreter_events (const qt_interpreter_events&) = delete; - - qt_interpreter_events& operator = (const qt_interpreter_events&) = delete; + OCTAVE_DISABLE_COPY_MOVE (qt_interpreter_events) ~qt_interpreter_events () = default;
--- a/libgui/src/variable-editor-model.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/variable-editor-model.cc Thu Feb 16 14:43:18 2023 -0500 @@ -332,11 +332,7 @@ ~numeric_model () = default; - // No copying! - - numeric_model (const numeric_model&) = delete; - - numeric_model& operator = (const numeric_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (numeric_model) void maybe_resize_rows (int rows) { @@ -396,11 +392,7 @@ ~string_model () = default; - // No copying! - - string_model (const string_model&) = delete; - - string_model& operator = (const string_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (string_model) QVariant edit_display (const QModelIndex&, int) const { @@ -433,11 +425,7 @@ ~cell_model () = default; - // No copying! - - cell_model (const cell_model&) = delete; - - cell_model& operator = (const cell_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (cell_model) void maybe_resize_rows (int rows) { @@ -534,11 +522,7 @@ ~scalar_struct_model () = default; - // No copying! - - scalar_struct_model (const scalar_struct_model&) = delete; - - scalar_struct_model& operator = (const scalar_struct_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (scalar_struct_model) QVariant edit_display (const QModelIndex& idx, int role) const { @@ -657,11 +641,7 @@ ~display_only_model () = default; - // No copying! - - display_only_model (const display_only_model&) = delete; - - display_only_model& operator = (const display_only_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (display_only_model) bool is_editable () const { return false; } @@ -708,11 +688,7 @@ ~vector_struct_model () = default; - // No copying! - - vector_struct_model (const vector_struct_model&) = delete; - - vector_struct_model& operator = (const vector_struct_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (vector_struct_model) void maybe_resize_rows (int rows) { @@ -841,11 +817,7 @@ ~struct_model () = default; - // No copying! - - struct_model (const struct_model&) = delete; - - struct_model& operator = (const struct_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (struct_model) void maybe_resize_rows (int rows) {
--- a/libgui/src/variable-editor-model.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/variable-editor-model.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_variable_editor_model_h) #define octave_variable_editor_model_h 1 +#include "octave-config.h" + #include <QAbstractTableModel> #include <QMap> #include <QString> @@ -47,11 +49,7 @@ virtual ~base_ve_model () = default; - // No copying! - - base_ve_model (const base_ve_model&) = delete; - - base_ve_model& operator = (const base_ve_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_ve_model) virtual void maybe_resize_rows (int) { } @@ -150,11 +148,7 @@ delete rep; } - // No copying! - - variable_editor_model (const variable_editor_model&) = delete; - - variable_editor_model& operator = (const variable_editor_model&) = delete; + OCTAVE_DISABLE_COPY_MOVE (variable_editor_model) std::string name () const {
--- a/libgui/src/variable-editor.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libgui/src/variable-editor.h Thu Feb 16 14:43:18 2023 -0500 @@ -26,6 +26,8 @@ #if ! defined (octave_variable_editor_h) #define octave_variable_editor_h 1 +#include "octave-config.h" + #include <QHeaderView> #include <QSignalMapper> #include <QStackedWidget> @@ -293,11 +295,7 @@ ~variable_editor (); - // No copying! - - variable_editor (const variable_editor&) = delete; - - variable_editor& operator = (const variable_editor&) = delete; + OCTAVE_DISABLE_COPY_MOVE (variable_editor) void refresh ();
--- a/libinterp/corefcn/base-text-renderer.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/base-text-renderer.h Thu Feb 16 14:43:18 2023 -0500 @@ -55,11 +55,7 @@ base_text_renderer () : text_processor () { } - // No copying! - - base_text_renderer (const base_text_renderer&) = delete; - - base_text_renderer& operator = (const base_text_renderer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_text_renderer) virtual ~base_text_renderer () = default;
--- a/libinterp/corefcn/c-file-ptr-stream.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/c-file-ptr-stream.h Thu Feb 16 14:43:18 2023 -0500 @@ -52,11 +52,7 @@ : std::streambuf (), m_f (f), m_cf (cf) { } - // No copying! - - c_file_ptr_buf (const c_file_ptr_buf&) = delete; - - c_file_ptr_buf& operator = (const c_file_ptr_buf&) = delete; + OCTAVE_DISABLE_COPY_MOVE (c_file_ptr_buf) ~c_file_ptr_buf (); @@ -118,11 +114,7 @@ : STREAM_T (nullptr), m_buf (new BUF_T (m_f, m_cf)) { STREAM_T::init (m_buf); } - // No copying! - - c_file_ptr_stream (const c_file_ptr_stream&) = delete; - - c_file_ptr_stream& operator = (const c_file_ptr_stream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (c_file_ptr_stream) ~c_file_ptr_stream () { delete m_buf; m_buf = nullptr; } @@ -167,11 +159,7 @@ : std::streambuf (), m_f (f), m_cf (cf) { } - // No copying! - - c_zfile_ptr_buf (const c_zfile_ptr_buf&) = delete; - - c_zfile_ptr_buf& operator = (const c_zfile_ptr_buf&) = delete; + OCTAVE_DISABLE_COPY_MOVE (c_zfile_ptr_buf) ~c_zfile_ptr_buf ();
--- a/libinterp/corefcn/dynamic-ld.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/dynamic-ld.h Thu Feb 16 14:43:18 2023 -0500 @@ -54,11 +54,7 @@ shlibs_list () : m_lib_list () { } - // No copying! - - shlibs_list (const shlibs_list&) = delete; - - shlibs_list& operator = (const shlibs_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (shlibs_list) ~shlibs_list () = default; @@ -83,11 +79,7 @@ : m_interpreter (interp), m_loaded_shlibs (), m_doing_load (false) { } - // No copying! - - dynamic_loader (const dynamic_loader&) = delete; - - dynamic_loader& operator = (const dynamic_loader&) = delete; + OCTAVE_DISABLE_COPY_MOVE (dynamic_loader) virtual ~dynamic_loader () = default;
--- a/libinterp/corefcn/error.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/error.h Thu Feb 16 14:43:18 2023 -0500 @@ -48,9 +48,7 @@ OCTINTERP_API error_system (interpreter& interp); - error_system (const error_system&) = delete; - - error_system& operator = (const error_system&) = delete; + OCTAVE_DISABLE_COPY_MOVE (error_system) ~error_system () = default;
--- a/libinterp/corefcn/event-manager.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/event-manager.h Thu Feb 16 14:43:18 2023 -0500 @@ -296,12 +296,7 @@ OCTINTERP_API event_manager (interpreter& interp); - // No copying! - - event_manager (const event_manager&) = delete; - - event_manager& - operator = (const event_manager&) = delete; + OCTAVE_DISABLE_COPY_MOVE (event_manager) virtual ~event_manager ();
--- a/libinterp/corefcn/event-queue.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/event-queue.h Thu Feb 16 14:43:18 2023 -0500 @@ -42,11 +42,7 @@ event_queue () : m_fifo () { } - // No copying! - - event_queue (const event_queue&) = delete; - - event_queue& operator = (const event_queue&) = delete; + OCTAVE_DISABLE_COPY_MOVE (event_queue) // Destructor should not raise an exception, so all actions registered // should be exception-safe. If you're not sure, see event_queue_safe. @@ -99,11 +95,7 @@ event_queue_safe () : event_queue () { } - // No copying! - - event_queue_safe (const event_queue_safe&) = delete; - - event_queue_safe& operator = (const event_queue_safe&) = delete; + OCTAVE_DISABLE_COPY_MOVE (event_queue_safe) ~event_queue_safe () {
--- a/libinterp/corefcn/fcn-info.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/fcn-info.h Thu Feb 16 14:43:18 2023 -0500 @@ -68,11 +68,7 @@ } } - // No copying! - - fcn_info_rep (const fcn_info_rep&) = delete; - - fcn_info_rep& operator = (const fcn_info_rep&) = delete; + OCTAVE_DISABLE_COPY_MOVE (fcn_info_rep) ~fcn_info_rep () = default;
--- a/libinterp/corefcn/ft-text-renderer.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/ft-text-renderer.cc Thu Feb 16 14:43:18 2023 -0500 @@ -121,11 +121,7 @@ public: - // No copying! - - ft_manager (const ft_manager&) = delete; - - ft_manager& operator = (const ft_manager&) = delete; + OCTAVE_DISABLE_COPY_MOVE (ft_manager) private: @@ -476,11 +472,7 @@ m_max_fontsize (0), m_antialias (true) { } - // No copying! - - ft_text_renderer (const ft_text_renderer&) = delete; - - ft_text_renderer& operator = (const ft_text_renderer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (ft_text_renderer) ~ft_text_renderer () = default;
--- a/libinterp/corefcn/gl-render.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/gl-render.cc Thu Feb 16 14:43:18 2023 -0500 @@ -353,11 +353,7 @@ opengl_tessellator () : m_glu_tess (nullptr), m_fill () { init (); } - // No copying! - - opengl_tessellator (const opengl_tessellator&) = delete; - - opengl_tessellator operator = (const opengl_tessellator&) = delete; + OCTAVE_DISABLE_COPY_MOVE (opengl_tessellator) virtual ~opengl_tessellator () { if (m_glu_tess) gluDeleteTess (m_glu_tess); } @@ -512,6 +508,7 @@ opengl_renderer::patch_tessellator : public opengl_tessellator { public: + patch_tessellator (opengl_renderer *r, int cmode, int lmode, bool fl, float idx = 0.0) : opengl_tessellator (), m_renderer (r), @@ -519,6 +516,8 @@ m_index (idx), m_first (true), m_tmp_vdata () { } + OCTAVE_DISABLE_COPY_MOVE (patch_tessellator) + protected: void begin (GLenum type) { @@ -657,12 +656,6 @@ private: - // No copying! - - patch_tessellator (const patch_tessellator&) = delete; - - patch_tessellator& operator = (const patch_tessellator&) = delete; - opengl_renderer *m_renderer; int m_color_mode; int m_light_mode;
--- a/libinterp/corefcn/gl-render.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/gl-render.h Thu Feb 16 14:43:18 2023 -0500 @@ -43,11 +43,7 @@ opengl_renderer (opengl_functions& glfcns); - // No copying! - - opengl_renderer (const opengl_renderer&) = delete; - - opengl_renderer& operator = (const opengl_renderer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (opengl_renderer) virtual ~opengl_renderer () = default;
--- a/libinterp/corefcn/graphics.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/graphics.cc Thu Feb 16 14:43:18 2023 -0500 @@ -1937,9 +1937,7 @@ callback_props () : m_set () { } - callback_props (const callback_props&) = delete; - - callback_props& operator = (const callback_props&) = delete; + OCTAVE_DISABLE_COPY_MOVE (callback_props) ~callback_props () = default; @@ -11673,11 +11671,7 @@ : base_graphics_event (), m_function (fcn), m_function_data (data) { } - // No copying! - - function_event (const function_event&) = delete; - - function_event& operator = (const function_event&) = delete; + OCTAVE_DISABLE_COPY_MOVE (function_event) void execute () {
--- a/libinterp/corefcn/graphics.in.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/graphics.in.h Thu Feb 16 14:43:18 2023 -0500 @@ -2449,11 +2449,7 @@ base_graphics_object () : m_toolkit_flag (false) { } - // No copying! - - base_graphics_object (const base_graphics_object&) = delete; - - base_graphics_object& operator = (const base_graphics_object&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_graphics_object) virtual ~base_graphics_object () = default; @@ -2990,9 +2986,7 @@ ~root_figure () = default; - root_figure (const root_figure&) = delete; - - root_figure& operator = (const root_figure&) = delete; + OCTAVE_DISABLE_COPY_MOVE (root_figure) void mark_modified () { }
--- a/libinterp/corefcn/gzfstream.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/gzfstream.h Thu Feb 16 14:43:18 2023 -0500 @@ -58,11 +58,7 @@ // Default constructor. gzfilebuf (); - // No copying! - - gzfilebuf (const gzfilebuf&) = delete; - - gzfilebuf& operator = (const gzfilebuf&) = delete; + OCTAVE_DISABLE_COPY_MOVE (gzfilebuf) // Destructor. virtual ~gzfilebuf ();
--- a/libinterp/corefcn/interpreter.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/interpreter.cc Thu Feb 16 14:43:18 2023 -0500 @@ -772,9 +772,7 @@ cli_input_reader (interpreter& interp) : m_interpreter (interp), m_thread () { } - cli_input_reader (const cli_input_reader&) = delete; - - cli_input_reader& operator = (const cli_input_reader&) = delete; + OCTAVE_DISABLE_COPY_MOVE (cli_input_reader) ~cli_input_reader () {
--- a/libinterp/corefcn/interpreter.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/interpreter.h Thu Feb 16 14:43:18 2023 -0500 @@ -93,11 +93,7 @@ temporary_file_list () : m_files () { } - // No copying! - - temporary_file_list (const temporary_file_list&) = delete; - - temporary_file_list& operator = (const temporary_file_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (temporary_file_list) ~temporary_file_list (); @@ -120,11 +116,7 @@ interpreter (application *app_context = nullptr); - // No copying, at least not yet... - - interpreter (const interpreter&) = delete; - - interpreter& operator = (const interpreter&) = delete; + OCTAVE_DISABLE_COPY_MOVE (interpreter) // Clean up the interpreter object.
--- a/libinterp/corefcn/load-path.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/load-path.h Thu Feb 16 14:43:18 2023 -0500 @@ -51,9 +51,7 @@ typedef void (*hook_fcn_ptr) (const std::string& dir); - load_path (const load_path&) = delete; - - load_path& operator = (const load_path&) = delete; + OCTAVE_DISABLE_COPY_MOVE (load_path) ~load_path () = default;
--- a/libinterp/corefcn/load-save.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/load-save.h Thu Feb 16 14:43:18 2023 -0500 @@ -77,9 +77,7 @@ OCTINTERP_API ~load_save_system (); - load_save_system (const load_save_system&) = delete; - - load_save_system& operator = (const load_save_system&) = delete; + OCTAVE_DISABLE_COPY_MOVE (load_save_system) OCTINTERP_API octave_value crash_dumps_octave_core (const octave_value_list& args, int nargout);
--- a/libinterp/corefcn/mex.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/mex.cc Thu Feb 16 14:43:18 2023 -0500 @@ -3156,11 +3156,7 @@ mex (octave_mex_function& f) : m_curr_mex_fcn (f), m_memlist (), m_arraylist (), m_fname (nullptr) { } - // No copying! - - mex (const mex&) = delete; - - mex& operator = (const mex&) = delete; + OCTAVE_DISABLE_COPY_MOVE (mex) ~mex (void) {
--- a/libinterp/corefcn/mxarray.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/mxarray.h Thu Feb 16 14:43:18 2023 -0500 @@ -371,11 +371,7 @@ return retval; } - // No copying! - - mxArray (const mxArray&) = delete; - - mxArray& operator = (const mxArray&) = delete; + OCTAVE_DISABLE_COPY_MOVE (mxArray) OCTINTERP_API ~mxArray ();
--- a/libinterp/corefcn/oct-fstrm.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-fstrm.h Thu Feb 16 14:43:18 2023 -0500 @@ -44,11 +44,7 @@ std::ios::openmode arg_md = std::ios::in | std::ios::out, mach_info::float_format flt_fmt = mach_info::native_float_format ()); - // No copying! - - fstream (const fstream&) = delete; - - fstream& operator = (const fstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (fstream) static stream create (const std::string& nm_arg,
--- a/libinterp/corefcn/oct-hist.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-hist.h Thu Feb 16 14:43:18 2023 -0500 @@ -44,9 +44,7 @@ history_system (interpreter& interp); - history_system (const history_system&) = delete; - - history_system& operator = (const history_system&) = delete; + OCTAVE_DISABLE_COPY_MOVE (history_system) ~history_system () = default;
--- a/libinterp/corefcn/oct-iostrm.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-iostrm.h Thu Feb 16 14:43:18 2023 -0500 @@ -44,11 +44,7 @@ mach_info::float_format ff = mach_info::native_float_format ()) : base_stream (m, ff), m_name (n) { } - // No copying! - - base_iostream (const base_iostream&) = delete; - - base_iostream& operator = (const base_iostream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_iostream) protected: @@ -93,6 +89,8 @@ m_istream (arg) { } + OCTAVE_DISABLE_COPY_MOVE (istream) + static stream create (std::istream *arg = nullptr, const std::string& n = ""); @@ -113,12 +111,6 @@ std::istream *m_istream; const char * stream_type () const { return "istream"; } - - // No copying! - - istream (const istream&) = delete; - - istream& operator = (const istream&) = delete; }; class @@ -131,6 +123,8 @@ m_ostream (arg) { } + OCTAVE_DISABLE_COPY_MOVE (ostream) + static stream create (std::ostream *arg, const std::string& n = ""); @@ -151,12 +145,6 @@ std::ostream *m_ostream; const char * stream_type () const { return "ostream"; } - - // No copying! - - ostream (const ostream&) = delete; - - ostream& operator = (const ostream&) = delete; }; OCTAVE_END_NAMESPACE(octave)
--- a/libinterp/corefcn/oct-prcstrm.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-prcstrm.h Thu Feb 16 14:43:18 2023 -0500 @@ -51,11 +51,7 @@ = octave::mach_info::native_float_format (), const std::string& encoding = "utf-8"); - // No copying! - - octave_iprocstream (const octave_iprocstream&) = delete; - - octave_iprocstream& operator = (const octave_iprocstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_iprocstream) static octave::stream create (const std::string& n, std::ios::openmode arg_md = std::ios::in, @@ -79,11 +75,7 @@ = octave::mach_info::native_float_format (), const std::string& encoding = "utf-8"); - // No copying! - - octave_oprocstream (const octave_oprocstream&) = delete; - - octave_oprocstream& operator = (const octave_oprocstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_oprocstream) static octave::stream create (const std::string& n, std::ios::openmode arg_md = std::ios::out,
--- a/libinterp/corefcn/oct-procbuf.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-procbuf.h Thu Feb 16 14:43:18 2023 -0500 @@ -52,11 +52,7 @@ m_proc_pid (-1), m_next (nullptr) { open (command, mode); } - // No copying! - - procbuf (const procbuf&) = delete; - - procbuf& operator = (const procbuf&) = delete; + OCTAVE_DISABLE_COPY_MOVE (procbuf) ~procbuf () { close (); }
--- a/libinterp/corefcn/oct-stdstrm.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-stdstrm.h Thu Feb 16 14:43:18 2023 -0500 @@ -50,11 +50,7 @@ m_stream (f ? new STREAM_T (f, cf) : nullptr), m_fnum (fid) { } - // No copying! - - tstdiostream (const tstdiostream&) = delete; - - tstdiostream& operator = (const tstdiostream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tstdiostream) // Position a stream at OFFSET relative to ORIGIN. @@ -147,11 +143,7 @@ return stream (new stdiostream (n, f, m, ff, encoding, cf)); } - // No copying! - - stdiostream (const stdiostream&) = delete; - - stdiostream& operator = (const stdiostream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (stdiostream) protected: @@ -184,11 +176,7 @@ return stream (new zstdiostream (n, f, fid, m, ff, encoding, cf)); } - // No copying! - - zstdiostream (const zstdiostream&) = delete; - - zstdiostream& operator = (const zstdiostream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (zstdiostream) protected:
--- a/libinterp/corefcn/oct-stream.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-stream.cc Thu Feb 16 14:43:18 2023 -0500 @@ -291,11 +291,7 @@ scanf_format_list (const std::string& fmt = ""); - // No copying! - - scanf_format_list (const scanf_format_list&) = delete; - - scanf_format_list& operator = (const scanf_format_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (scanf_format_list) ~scanf_format_list (); @@ -799,11 +795,7 @@ printf_format_list (const std::string& fmt = ""); - // No copying! - - printf_format_list (const printf_format_list&) = delete; - - printf_format_list& operator = (const printf_format_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (printf_format_list) ~printf_format_list (); @@ -1231,11 +1223,7 @@ delimited_stream (std::istream& is, const delimited_stream& ds); - // No copying! - - delimited_stream (const delimited_stream&) = delete; - - delimited_stream& operator = (const delimited_stream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (delimited_stream) ~delimited_stream (); @@ -1729,11 +1717,7 @@ textscan_format_list (const std::string& fmt = std::string (), const std::string& who = "textscan"); - // No copying! - - textscan_format_list (const textscan_format_list&) = delete; - - textscan_format_list& operator = (const textscan_format_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (textscan_format_list) ~textscan_format_list (); @@ -1846,11 +1830,7 @@ textscan (const std::string& who_arg = "textscan", const std::string& encoding = "utf-8"); - // No copying! - - textscan (const textscan&) = delete; - - textscan& operator = (const textscan&) = delete; + OCTAVE_DISABLE_COPY_MOVE (textscan) ~textscan () = default; @@ -5540,11 +5520,7 @@ } } - // No copying! - - printf_value_cache (const printf_value_cache&) = delete; - - printf_value_cache& operator = (const printf_value_cache&) = delete; + OCTAVE_DISABLE_COPY_MOVE (printf_value_cache) ~printf_value_cache () = default;
--- a/libinterp/corefcn/oct-stream.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-stream.h Thu Feb 16 14:43:18 2023 -0500 @@ -79,11 +79,7 @@ m_errmsg () { } - // No copying! - - base_stream (const base_stream&) = delete; - - base_stream& operator = (const base_stream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_stream) virtual ~base_stream () = default; @@ -505,8 +501,7 @@ OCTINTERP_API stream_list (interpreter& interp); - stream_list (const stream_list&) = delete; - stream_list& operator = (const stream_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (stream_list) OCTINTERP_API ~stream_list ();
--- a/libinterp/corefcn/oct-strstrm.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/oct-strstrm.h Thu Feb 16 14:43:18 2023 -0500 @@ -46,11 +46,7 @@ const std::string& encoding = "utf-8") : base_stream (m, ff, encoding) { } - // No copying! - - base_strstream (const base_strstream&) = delete; - - base_strstream& operator = (const base_strstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_strstream) protected: @@ -94,11 +90,7 @@ const std::string& encoding = "utf-8") : base_strstream (arg_md, ff, encoding), m_istream (data) { } - // No copying! - - istrstream (const istrstream&) = delete; - - istrstream& operator = (const istrstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (istrstream) protected: @@ -151,11 +143,7 @@ const std::string& encoding = "utf-8") : base_strstream (arg_md, ff, encoding), m_ostream () { } - // No copying! - - ostrstream (const ostrstream&) = delete; - - ostrstream& operator = (const ostrstream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (ostrstream) protected:
--- a/libinterp/corefcn/pager.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/pager.h Thu Feb 16 14:43:18 2023 -0500 @@ -70,11 +70,7 @@ pager_stream (); - // No copying! - - pager_stream (const pager_stream&) = delete; - - pager_stream& operator = (const pager_stream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (pager_stream) ~pager_stream (); @@ -112,11 +108,7 @@ diary_stream (); - // No copying! - - diary_stream (const diary_stream&) = delete; - - diary_stream& operator = (const diary_stream&) = delete; + OCTAVE_DISABLE_COPY_MOVE (diary_stream) ~diary_stream (); @@ -137,9 +129,7 @@ output_system (interpreter& interp); - output_system (const output_system&) = delete; - - output_system& operator = (const output_system&) = delete; + OCTAVE_DISABLE_COPY_MOVE (output_system) ~output_system () = default;
--- a/libinterp/corefcn/settings.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/settings.h Thu Feb 16 14:43:18 2023 -0500 @@ -47,9 +47,7 @@ settings (); - settings (const settings&) = delete; - - settings& operator = (const settings&) = delete; + OCTAVE_DISABLE_COPY_MOVE (settings) ~settings () = default;
--- a/libinterp/corefcn/stack-frame.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/stack-frame.cc Thu Feb 16 14:43:18 2023 -0500 @@ -594,11 +594,7 @@ public: - // No copying! - - stack_frame_walker (const stack_frame_walker&) = delete; - - stack_frame_walker& operator = (const stack_frame_walker&) = delete; + OCTAVE_DISABLE_COPY_MOVE (stack_frame_walker) virtual void visit_compiled_fcn_stack_frame (compiled_fcn_stack_frame&) = 0; @@ -635,9 +631,7 @@ m_have_regexp (false), m_cleared_names () { } - symbol_cleaner (const symbol_cleaner&) = delete; - - symbol_cleaner& operator = (const symbol_cleaner&) = delete; + OCTAVE_DISABLE_COPY_MOVE (symbol_cleaner) ~symbol_cleaner () = default; @@ -796,9 +790,7 @@ m_sym_inf_list (), m_found_names () { } - symbol_info_accumulator (const symbol_info_accumulator&) = delete; - - symbol_info_accumulator& operator = (const symbol_info_accumulator&) = delete; + OCTAVE_DISABLE_COPY_MOVE (symbol_info_accumulator) ~symbol_info_accumulator () = default;
--- a/libinterp/corefcn/symscope.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/symscope.h Thu Feb 16 14:43:18 2023 -0500 @@ -77,11 +77,7 @@ insert_local ("ans"); } - // No copying! - - symbol_scope_rep (const symbol_scope&) = delete; - - symbol_scope_rep& operator = (const symbol_scope&) = delete; + OCTAVE_DISABLE_COPY_MOVE (symbol_scope_rep) ~symbol_scope_rep () = default;
--- a/libinterp/corefcn/symtab.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/symtab.h Thu Feb 16 14:43:18 2023 -0500 @@ -60,11 +60,7 @@ symbol_table (interpreter& interp); - // No copying! - - symbol_table (const symbol_table&) = delete; - - symbol_table& operator = (const symbol_table&) = delete; + OCTAVE_DISABLE_COPY_MOVE (symbol_table) ~symbol_table () = default;
--- a/libinterp/corefcn/text-renderer.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/text-renderer.h Thu Feb 16 14:43:18 2023 -0500 @@ -49,11 +49,7 @@ text_renderer (); - // No copying! - - text_renderer (const text_renderer&) = delete; - - text_renderer& operator = (const text_renderer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (text_renderer) ~text_renderer ();
--- a/libinterp/corefcn/url-handle-manager.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/corefcn/url-handle-manager.h Thu Feb 16 14:43:18 2023 -0500 @@ -52,9 +52,7 @@ : m_handle_map (), m_handle_free_list (), m_next_handle (-1.0 - (rand () + 1.0) / (RAND_MAX + 2.0)) { } - url_handle_manager (const url_handle_manager&) = delete; - - url_handle_manager& operator = (const url_handle_manager&) = delete; + OCTAVE_DISABLE_COPY_MOVE (url_handle_manager) ~url_handle_manager () = default;
--- a/libinterp/dldfcn/__init_fltk__.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/dldfcn/__init_fltk__.cc Thu Feb 16 14:43:18 2023 -0500 @@ -751,11 +751,7 @@ m_menubar->clear (); } - // No copying! - - fltk_uimenu (const fltk_uimenu&) = delete; - - fltk_uimenu operator = (const fltk_uimenu&) = delete; + OCTAVE_DISABLE_COPY_MOVE (fltk_uimenu) ~fltk_uimenu () { @@ -882,11 +878,7 @@ } } - // No copying! - - plot_window (const plot_window&) = delete; - - plot_window& operator = (const plot_window&) = delete; + OCTAVE_DISABLE_COPY_MOVE (plot_window) ~plot_window () { @@ -1884,11 +1876,7 @@ public: - // No copying! - - figure_manager (const figure_manager&) = delete; - - figure_manager& operator = (const figure_manager&) = delete; + OCTAVE_DISABLE_COPY_MOVE (figure_manager) ~figure_manager () {
--- a/libinterp/dldfcn/gzip.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/dldfcn/gzip.cc Thu Feb 16 14:43:18 2023 -0500 @@ -107,9 +107,7 @@ throw std::runtime_error ("unable to open file"); } - CFile (const CFile&) = delete; - - CFile& operator = (const CFile&) = delete; + OCTAVE_DISABLE_COPY_MOVE (CFile) ~CFile () { @@ -161,9 +159,7 @@ throw std::runtime_error ("failed to open bzip2 stream"); } - zipper (const zipper&) = delete; - - zipper& operator = (const zipper&) = delete; + OCTAVE_DISABLE_COPY_MOVE (zipper) ~zipper () { @@ -273,9 +269,7 @@ std::strcpy (reinterpret_cast<char *> (p), str.c_str ()); } - uchar_array (const uchar_array&) = delete; - - uchar_array& operator = (const uchar_array&) = delete; + OCTAVE_DISABLE_COPY_MOVE (uchar_array) ~uchar_array () { delete[] p; } }; @@ -353,9 +347,7 @@ #endif } - gzip_header (const gzip_header&) = delete; - - gzip_header& operator = (const gzip_header&) = delete; + OCTAVE_DISABLE_COPY_MOVE (gzip_header) ~gzip_header () = default; @@ -380,9 +372,7 @@ m_strm->opaque = Z_NULL; } - zipper (const zipper&) = delete; - - zipper& operator = (const zipper&) = delete; + OCTAVE_DISABLE_COPY_MOVE (zipper) ~zipper () {
--- a/libinterp/octave-value/cdef-class.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/cdef-class.cc Thu Feb 16 14:43:18 2023 -0500 @@ -136,9 +136,7 @@ ctor_analyzer (const std::string& ctor, const std::string& obj) : tree_walker (), m_who (ctor), m_obj_name (obj) { } - ctor_analyzer (const ctor_analyzer&) = delete; - - ctor_analyzer& operator = (const ctor_analyzer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (ctor_analyzer) ~ctor_analyzer () = default;
--- a/libinterp/octave-value/cdef-manager.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/cdef-manager.h Thu Feb 16 14:43:18 2023 -0500 @@ -47,11 +47,7 @@ OCTINTERP_API cdef_manager (interpreter& interp); - // No copying! - - cdef_manager (const cdef_manager&) = delete; - - cdef_manager& operator = (const cdef_manager&) = delete; + OCTAVE_DISABLE_COPY_MOVE (cdef_manager) ~cdef_manager () = default;
--- a/libinterp/octave-value/ov-builtin.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-builtin.h Thu Feb 16 14:43:18 2023 -0500 @@ -82,11 +82,7 @@ : octave_function (nm, ds), m_fcn (nullptr), m_meth (mm), m_file (fnm) { } - // No copying! - - octave_builtin (const octave_builtin& ob) = delete; - - octave_builtin& operator = (const octave_builtin& ob) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_builtin) ~octave_builtin () = default;
--- a/libinterp/octave-value/ov-class.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-class.cc Thu Feb 16 14:43:18 2023 -0500 @@ -2084,11 +2084,7 @@ octave_inline_fcn (octave_inline *obj) : m_inline_obj (obj) { } - // No copying! - - octave_inline_fcn (const octave_inline_fcn& ob) = delete; - - octave_inline_fcn& operator = (const octave_inline_fcn& ob) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_inline_fcn) ~octave_inline_fcn () = default;
--- a/libinterp/octave-value/ov-classdef.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-classdef.h Thu Feb 16 14:43:18 2023 -0500 @@ -54,9 +54,7 @@ octave_classdef (const octave::cdef_object& obj) : octave_base_value (), m_object (obj) { } - octave_classdef (const octave_classdef&) = delete; - - octave_classdef& operator = (const octave_classdef&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_classdef) ~octave_classdef () = default; @@ -177,9 +175,7 @@ : m_object (obj) { } - octave_classdef_meta (const octave_classdef_meta&) = delete; - - octave_classdef_meta& operator = (const octave_classdef_meta&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_classdef_meta) ~octave_classdef_meta () { m_object.meta_release (); } @@ -249,9 +245,7 @@ : octave_function (), m_method_name (meth), m_class_name (cls) { } - octave_classdef_superclass_ref (const octave_classdef_superclass_ref&) = delete; - - octave_classdef_superclass_ref& operator = (const octave_classdef_superclass_ref&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_classdef_superclass_ref) ~octave_classdef_superclass_ref () = default;
--- a/libinterp/octave-value/ov-dld-fcn.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-dld-fcn.h Thu Feb 16 14:43:18 2023 -0500 @@ -61,11 +61,7 @@ const std::string& nm = "", const std::string& ds = ""); - // No copying! - - octave_dld_function (const octave_dld_function& fcn) = delete; - - octave_dld_function& operator = (const octave_dld_function& fcn) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_dld_function) ~octave_dld_function ();
--- a/libinterp/octave-value/ov-fcn.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-fcn.h Thu Feb 16 14:43:18 2023 -0500 @@ -59,11 +59,7 @@ m_dispatch_class (), m_package_name (), m_name (), m_dir_name (), m_doc () { } - // No copying! - - octave_function (const octave_function& f) = delete; - - octave_function& operator = (const octave_function& f) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_function) ~octave_function () = default;
--- a/libinterp/octave-value/ov-mex-fcn.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-mex-fcn.h Thu Feb 16 14:43:18 2023 -0500 @@ -62,11 +62,7 @@ const octave::dynamic_library& shl, const std::string& nm = ""); - // No copying! - - octave_mex_function (const octave_mex_function& fcn) = delete; - - octave_mex_function& operator = (const octave_mex_function& fcn) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_mex_function) ~octave_mex_function ();
--- a/libinterp/octave-value/ov-typeinfo.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-typeinfo.h Thu Feb 16 14:43:18 2023 -0500 @@ -69,11 +69,7 @@ explicit type_info (int init_tab_sz = 16); - // No copying! - - type_info (const type_info&) = delete; - - type_info& operator = (const type_info&) = delete; + OCTAVE_DISABLE_COPY_MOVE (type_info) ~type_info () = default;
--- a/libinterp/octave-value/ov-usr-fcn.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave-value/ov-usr-fcn.h Thu Feb 16 14:43:18 2023 -0500 @@ -73,11 +73,7 @@ public: - // No copying! - - octave_user_code (const octave_user_code& f) = delete; - - octave_user_code& operator = (const octave_user_code& f) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_user_code) ~octave_user_code (); @@ -164,11 +160,7 @@ const octave::symbol_scope& scope = octave::symbol_scope (), const std::string& ds = ""); - // No copying! - - octave_user_script (const octave_user_script& f) = delete; - - octave_user_script& operator = (const octave_user_script& f) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_user_script) ~octave_user_script () = default; @@ -215,11 +207,7 @@ octave::tree_parameter_list *rl = nullptr, octave::tree_statement_list *cl = nullptr); - // No copying! - - octave_user_function (const octave_user_function& fcn) = delete; - - octave_user_function& operator = (const octave_user_function& fcn) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_user_function) ~octave_user_function ();
--- a/libinterp/octave.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/octave.h Thu Feb 16 14:43:18 2023 -0500 @@ -249,11 +249,7 @@ application (int argc, char **argv); - // No copying, at least not yet... - - application (const application&) = delete; - - application& operator = (const application&) = delete; + OCTAVE_DISABLE_COPY_MOVE (application) virtual ~application (); @@ -374,11 +370,7 @@ : application (argc, argv) { } - // No copying, at least not yet... - - cli_application (const cli_application&) = delete; - - cli_application& operator = (const cli_application&) = delete; + OCTAVE_DISABLE_COPY_MOVE (cli_application) ~cli_application () = default;
--- a/libinterp/parse-tree/anon-fcn-validator.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/anon-fcn-validator.h Thu Feb 16 14:43:18 2023 -0500 @@ -45,11 +45,7 @@ anon_fcn_validator (tree_parameter_list *, tree_expression *expr); - // No copying! - - anon_fcn_validator (const anon_fcn_validator&) = delete; - - anon_fcn_validator& operator = (const anon_fcn_validator&) = delete; + OCTAVE_DISABLE_COPY_MOVE (anon_fcn_validator) ~anon_fcn_validator () = default;
--- a/libinterp/parse-tree/lex.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/lex.h Thu Feb 16 14:43:18 2023 -0500 @@ -193,11 +193,7 @@ token_cache () : m_buffer () { } - // No copying! - - token_cache (const token_cache&) = delete; - - token_cache& operator = (const token_cache&) = delete; + OCTAVE_DISABLE_COPY_MOVE (token_cache) ~token_cache () { clear (); } @@ -320,11 +316,7 @@ init (); } - // No copying! - - lexical_feedback (const lexical_feedback&) = delete; - - lexical_feedback& operator = (const lexical_feedback&) = delete; + OCTAVE_DISABLE_COPY_MOVE (lexical_feedback) ~lexical_feedback (); @@ -609,11 +601,7 @@ init (); } - // No copying! - - base_lexer (const base_lexer&) = delete; - - base_lexer& operator = (const base_lexer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_lexer) virtual ~base_lexer (); @@ -780,11 +768,7 @@ m_initial_input (true) { } - // No copying! - - lexer (const lexer&) = delete; - - lexer& operator = (const lexer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (lexer) void reset () { @@ -858,11 +842,7 @@ append_input (input, eof); } - // No copying! - - push_lexer (const push_lexer&) = delete; - - push_lexer& operator = (const push_lexer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (push_lexer) bool is_push_lexer () const { return true; }
--- a/libinterp/parse-tree/oct-parse.yy Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/oct-parse.yy Thu Feb 16 14:43:18 2023 -0500 @@ -2458,9 +2458,7 @@ : m_scope (), m_error_list () { } - parse_tree_validator (const parse_tree_validator&) = delete; - - parse_tree_validator& operator = (const parse_tree_validator&) = delete; + OCTAVE_DISABLE_COPY_MOVE (parse_tree_validator) ~parse_tree_validator () = default;
--- a/libinterp/parse-tree/parse.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/parse.h Thu Feb 16 14:43:18 2023 -0500 @@ -128,11 +128,7 @@ : m_parser (parser), m_info (), m_all_names () { } - // No copying! - - parent_scope_info (const parent_scope_info&) = delete; - - parent_scope_info& operator = (const parent_scope_info&) = delete; + OCTAVE_DISABLE_COPY_MOVE (parent_scope_info) ~parent_scope_info () = default; @@ -165,11 +161,7 @@ OCTINTERP_API base_parser (base_lexer& lxr); - // No copying! - - base_parser (const base_parser&) = delete; - - base_parser& operator = (const base_parser&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_parser) virtual ~base_parser (); @@ -853,11 +845,7 @@ : base_parser (*lxr) { } - // No copying! - - parser (const parser&) = delete; - - parser& operator = (const parser&) = delete; + OCTAVE_DISABLE_COPY_MOVE (parser) ~parser () = default; @@ -881,11 +869,7 @@ m_interpreter (interp), m_reader (reader) { } - // No copying! - - push_parser (const push_parser&) = delete; - - push_parser& operator = (const push_parser&) = delete; + OCTAVE_DISABLE_COPY_MOVE (push_parser) ~push_parser () = default;
--- a/libinterp/parse-tree/profiler.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/profiler.h Thu Feb 16 14:43:18 2023 -0500 @@ -76,11 +76,7 @@ } } - // No copying! - - enter (const enter&) = delete; - - enter& operator = (const enter&) = delete; + OCTAVE_DISABLE_COPY_MOVE (enter) ~enter () { @@ -91,11 +87,7 @@ profiler (); - // No copying! - - profiler (const profiler&) = delete; - - profiler& operator = (const profiler&) = delete; + OCTAVE_DISABLE_COPY_MOVE (profiler) virtual ~profiler (); @@ -145,11 +137,7 @@ virtual ~tree_node (); - // No copying! - - tree_node (const tree_node&) = delete; - - tree_node& operator = (const tree_node&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_node) void add_time (double dt) { m_time += dt; }
--- a/libinterp/parse-tree/pt-anon-scopes.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-anon-scopes.h Thu Feb 16 14:43:18 2023 -0500 @@ -45,11 +45,7 @@ tree_anon_scopes (tree_anon_fcn_handle& anon_fh); - // No copying! - - tree_anon_scopes (const tree_anon_scopes&) = delete; - - tree_anon_scopes& operator = (const tree_anon_scopes&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_anon_scopes) ~tree_anon_scopes () = default;
--- a/libinterp/parse-tree/pt-arg-list.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-arg-list.h Thu Feb 16 14:43:18 2023 -0500 @@ -61,11 +61,7 @@ : m_list_includes_magic_tilde (false), m_simple_assign_lhs (false) { append (t); } - // No copying! - - tree_argument_list (const tree_argument_list&) = delete; - - tree_argument_list& operator = (const tree_argument_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_argument_list) ~tree_argument_list ();
--- a/libinterp/parse-tree/pt-args-block.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-args-block.h Thu Feb 16 14:43:18 2023 -0500 @@ -49,11 +49,7 @@ : m_size_args (size_args) { } - // No copying! - - tree_arg_size_spec (const tree_arg_size_spec&) = delete; - - tree_arg_size_spec& operator = (const tree_arg_size_spec&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_arg_size_spec) ~tree_arg_size_spec () { @@ -80,11 +76,7 @@ : m_fcn_args (fcn_args) { } - // No copying! - - tree_arg_validation_fcns (const tree_arg_validation_fcns&) = delete; - - tree_arg_validation_fcns& operator = (const tree_arg_validation_fcns&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_arg_validation_fcns) ~tree_arg_validation_fcns () { @@ -116,11 +108,7 @@ m_default_value (default_value) { } - // No copying! - - tree_arg_validation (const tree_arg_validation&) = delete; - - tree_arg_validation& operator = (const tree_arg_validation&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_arg_validation) ~tree_arg_validation () { @@ -177,11 +165,7 @@ : base_list<tree_arg_validation *> (a) { } - // No copying! - - tree_args_block_validation_list (const tree_args_block_validation_list&) = delete; - - tree_args_block_validation_list& operator = (const tree_args_block_validation_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_args_block_validation_list) ~tree_args_block_validation_list (); @@ -202,11 +186,7 @@ : m_attr (attr) { } - // No copying! - - tree_args_block_attribute_list (const tree_args_block_attribute_list&) = delete; - - tree_args_block_attribute_list& operator = (const tree_args_block_attribute_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_args_block_attribute_list) ~tree_args_block_attribute_list () { @@ -239,11 +219,7 @@ m_lead_comm (nullptr), m_trail_comm (nullptr) { } - // No copying! - - tree_arguments_block (const tree_arguments_block&) = delete; - - tree_arguments_block& operator = (const tree_arguments_block&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_arguments_block) ~tree_arguments_block () {
--- a/libinterp/parse-tree/pt-array-list.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-array-list.h Thu Feb 16 14:43:18 2023 -0500 @@ -58,11 +58,7 @@ public: - // No copying! - - tree_array_list (const tree_array_list&) = delete; - - tree_array_list& operator = (const tree_array_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_array_list) ~tree_array_list ();
--- a/libinterp/parse-tree/pt-assign.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-assign.h Thu Feb 16 14:43:18 2023 -0500 @@ -60,11 +60,7 @@ bool plhs = false, int l = -1, int c = -1, octave_value::assign_op t = octave_value::op_asn_eq); - // No copying! - - tree_simple_assignment (const tree_simple_assignment&) = delete; - - tree_simple_assignment& operator = (const tree_simple_assignment&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_simple_assignment) ~tree_simple_assignment (); @@ -131,11 +127,7 @@ tree_multi_assignment (tree_argument_list *lst, tree_expression *r, bool plhs = false, int l = -1, int c = -1); - // No copying! - - tree_multi_assignment (const tree_multi_assignment&) = delete; - - tree_multi_assignment& operator = (const tree_multi_assignment&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_multi_assignment) ~tree_multi_assignment ();
--- a/libinterp/parse-tree/pt-binop.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-binop.h Thu Feb 16 14:43:18 2023 -0500 @@ -62,11 +62,7 @@ m_preserve_operands (false) { } - // No copying! - - tree_binary_expression (const tree_binary_expression&) = delete; - - tree_binary_expression& operator = (const tree_binary_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_binary_expression) ~tree_binary_expression () { @@ -138,13 +134,7 @@ : tree_binary_expression (a, b, l, c, t) { } - // No copying! - - tree_braindead_shortcircuit_binary_expression - (const tree_braindead_shortcircuit_binary_expression&) = delete; - - tree_braindead_shortcircuit_binary_expression& - operator = (const tree_braindead_shortcircuit_binary_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_braindead_shortcircuit_binary_expression) ~tree_braindead_shortcircuit_binary_expression () = default; @@ -175,11 +165,7 @@ int l = -1, int c = -1, type t = unknown) : tree_binary_expression (a, b, l, c), m_etype (t) { } - // No copying! - - tree_boolean_expression (const tree_boolean_expression&) = delete; - - tree_boolean_expression& operator = (const tree_boolean_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_boolean_expression) ~tree_boolean_expression () = default;
--- a/libinterp/parse-tree/pt-bp.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-bp.h Thu Feb 16 14:43:18 2023 -0500 @@ -50,11 +50,7 @@ m_bp_list (), m_bp_cond_list () { } - // No copying! - - tree_breakpoint (const tree_breakpoint&) = delete; - - tree_breakpoint& operator = (const tree_breakpoint&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_breakpoint) ~tree_breakpoint () = default;
--- a/libinterp/parse-tree/pt-cbinop.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-cbinop.h Thu Feb 16 14:43:18 2023 -0500 @@ -54,6 +54,8 @@ m_etype (ct) { } + OCTAVE_DISABLE_COPY_MOVE (tree_compound_binary_expression) + octave_value::compound_binary_op cop_type () const { return m_etype; } bool rvalue_ok () const { return true; } @@ -79,13 +81,6 @@ tree_expression *m_rhs; octave_value::compound_binary_op m_etype; - - // No copying! - - tree_compound_binary_expression (const tree_compound_binary_expression&) = delete; - - tree_compound_binary_expression& - operator = (const tree_compound_binary_expression&) = delete; }; // a "virtual constructor"
--- a/libinterp/parse-tree/pt-cell.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-cell.h Thu Feb 16 14:43:18 2023 -0500 @@ -51,11 +51,7 @@ : tree_array_list (row, l, c) { } - // No copying! - - tree_cell (const tree_cell&) = delete; - - tree_cell& operator = (const tree_cell&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_cell) ~tree_cell () = default;
--- a/libinterp/parse-tree/pt-check.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-check.h Thu Feb 16 14:43:18 2023 -0500 @@ -45,11 +45,7 @@ tree_checker () : m_do_lvalue_check (false), m_file_name () { } - // No copying! - - tree_checker (const tree_checker&) = delete; - - tree_checker& operator = (const tree_checker&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_checker) ~tree_checker () = default;
--- a/libinterp/parse-tree/pt-classdef.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-classdef.h Thu Feb 16 14:43:18 2023 -0500 @@ -57,11 +57,7 @@ : tree_expression (l, c), m_method_name (meth), m_class_name (cls) { } - // No copying! - - tree_superclass_ref (const tree_superclass_ref&) = delete; - - tree_superclass_ref& operator = (const tree_superclass_ref&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_superclass_ref) std::string method_name () const { @@ -107,11 +103,7 @@ : tree_expression (l, c), m_class_name (cls) { } - // No copying! - - tree_metaclass_query (const tree_metaclass_query&) = delete; - - tree_metaclass_query& operator = (const tree_metaclass_query&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_metaclass_query) std::string class_name () const { return m_class_name; } @@ -147,11 +139,7 @@ : m_id (i), m_expr (nullptr), m_neg (b) { } - // No copying! - - tree_classdef_attribute (const tree_classdef_attribute&) = delete; - - tree_classdef_attribute& operator = (const tree_classdef_attribute&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_attribute) ~tree_classdef_attribute () { @@ -189,12 +177,7 @@ : base_list<tree_classdef_attribute *> (a) { } - // No copying! - - tree_classdef_attribute_list (const tree_classdef_attribute_list&) = delete; - - tree_classdef_attribute_list& - operator = (const tree_classdef_attribute_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_attribute_list) ~tree_classdef_attribute_list (); @@ -212,12 +195,7 @@ : m_cls_name (cname) { } - // No copying! - - tree_classdef_superclass (const tree_classdef_superclass&) = delete; - - tree_classdef_superclass& - operator = (const tree_classdef_superclass&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_superclass) ~tree_classdef_superclass () = default; @@ -249,12 +227,7 @@ : base_list<tree_classdef_superclass *> (a) { } - // No copying! - - tree_classdef_superclass_list (const tree_classdef_superclass_list&) = delete; - - tree_classdef_superclass_list& - operator = (const tree_classdef_superclass_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_superclass_list) ~tree_classdef_superclass_list (); @@ -276,11 +249,7 @@ m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_classdef_element (const tree_classdef_element&) = delete; - - tree_classdef_element& operator = (const tree_classdef_element&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_element) ~tree_classdef_element () { @@ -322,11 +291,7 @@ tree_classdef_property (tree_arg_validation *av, comment_list *comments = nullptr); - // No copying! - - tree_classdef_property (const tree_classdef_property&) = delete; - - tree_classdef_property& operator = (const tree_classdef_property&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_property) ~tree_classdef_property (); @@ -365,12 +330,7 @@ tree_classdef_property_list (const base_list<tree_classdef_property *>& a) : base_list<tree_classdef_property *> (a) { } - // No copying! - - tree_classdef_property_list (const tree_classdef_property_list&) = delete; - - tree_classdef_property_list& - operator = (const tree_classdef_property_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_property_list) ~tree_classdef_property_list (); @@ -392,12 +352,7 @@ : tree_classdef_element<tree_classdef_property_list> (a, plist, lc, tc, l, c) { } - // No copying! - - tree_classdef_properties_block (const tree_classdef_properties_block&) = delete; - - tree_classdef_properties_block& - operator = (const tree_classdef_properties_block&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_properties_block) ~tree_classdef_properties_block () = default; @@ -418,12 +373,7 @@ tree_classdef_methods_list (const base_list<octave_value>& a) : base_list<octave_value> (a) { } - // No copying! - - tree_classdef_methods_list (const tree_classdef_methods_list&) = delete; - - tree_classdef_methods_list& - operator = (const tree_classdef_methods_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_methods_list) ~tree_classdef_methods_list () = default; @@ -445,12 +395,7 @@ : tree_classdef_element<tree_classdef_methods_list> (a, mlist, lc, tc, l, c) { } - // No copying! - - tree_classdef_methods_block (const tree_classdef_methods_block&) = delete; - - tree_classdef_methods_block& - operator = (const tree_classdef_methods_block&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_methods_block) ~tree_classdef_methods_block () = default; @@ -467,11 +412,7 @@ tree_classdef_event (tree_identifier *i = nullptr, comment_list *comments = nullptr); - // No copying! - - tree_classdef_event (const tree_classdef_event&) = delete; - - tree_classdef_event& operator = (const tree_classdef_event&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_event) ~tree_classdef_event () { @@ -512,12 +453,7 @@ : base_list<tree_classdef_event *> (a) { } - // No copying! - - tree_classdef_events_list (const tree_classdef_events_list&) = delete; - - tree_classdef_events_list& - operator = (const tree_classdef_events_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_events_list) ~tree_classdef_events_list (); @@ -539,12 +475,7 @@ : tree_classdef_element<tree_classdef_events_list> (a, elist, lc, tc, l, c) { } - // No copying! - - tree_classdef_events_block (const tree_classdef_events_block&) = delete; - - tree_classdef_events_block& - operator = (const tree_classdef_events_block&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_events_block) ~tree_classdef_events_block () = default; @@ -561,11 +492,7 @@ tree_classdef_enum (tree_identifier *i, tree_expression *e, comment_list *comments); - // No copying! - - tree_classdef_enum (const tree_classdef_enum&) = delete; - - tree_classdef_enum& operator = (const tree_classdef_enum&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_enum) ~tree_classdef_enum () { @@ -610,11 +537,7 @@ : base_list<tree_classdef_enum *> (a) { } - // No copying! - - tree_classdef_enum_list (const tree_classdef_enum_list&) = delete; - - tree_classdef_enum_list& operator = (const tree_classdef_enum_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_enum_list) ~tree_classdef_enum_list (); @@ -636,12 +559,7 @@ : tree_classdef_element<tree_classdef_enum_list> (a, elist, lc, tc, l, c) { } - // No copying! - - tree_classdef_enum_block (const tree_classdef_enum_block&) = delete; - - tree_classdef_enum_block& - operator = (const tree_classdef_enum_block&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_enum_block) ~tree_classdef_enum_block () = default; @@ -683,11 +601,7 @@ tree_classdef_body (tree_classdef_enum_block *enb); - // No copying! - - tree_classdef_body (const tree_classdef_body&) = delete; - - tree_classdef_body& operator = (const tree_classdef_body&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef_body) ~tree_classdef_body (); @@ -774,11 +688,7 @@ m_trail_comm (tc), m_pack_name (pn), m_file_name (fn) { } - // No copying! - - tree_classdef (const tree_classdef&) = delete; - - tree_classdef& operator = (const tree_classdef&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_classdef) ~tree_classdef () {
--- a/libinterp/parse-tree/pt-cmd.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-cmd.h Thu Feb 16 14:43:18 2023 -0500 @@ -46,11 +46,7 @@ tree_command (int l = -1, int c = -1) : tree (l, c) { } - // No copying! - - tree_command (const tree_command&) = delete; - - tree_command& operator = (const tree_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_command) virtual ~tree_command () = default; }; @@ -65,11 +61,7 @@ int l = -1, int c = -1) : tree_command (l, c), m_eof (e), m_orig_cmd (cmd) { } - // No copying! - - tree_no_op_command (const tree_no_op_command&) = delete; - - tree_no_op_command& operator = (const tree_no_op_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_no_op_command) ~tree_no_op_command () = default; @@ -103,11 +95,7 @@ tree_function_def (octave_function *f, int l = -1, int c = -1) : tree_command (l, c), m_fcn (f) { } - // No copying! - - tree_function_def (const tree_function_def&) = delete; - - tree_function_def& operator = (const tree_function_def&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_function_def) ~tree_function_def () = default;
--- a/libinterp/parse-tree/pt-colon.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-colon.h Thu Feb 16 14:43:18 2023 -0500 @@ -60,11 +60,7 @@ : tree_expression (l, c), m_base (bas), m_limit (lim), m_increment (inc), m_save_base (false) { } - // No copying! - - tree_colon_expression (const tree_colon_expression&) = delete; - - tree_colon_expression& operator = (const tree_colon_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_colon_expression) ~tree_colon_expression () {
--- a/libinterp/parse-tree/pt-const.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-const.h Thu Feb 16 14:43:18 2023 -0500 @@ -61,11 +61,7 @@ : tree_expression (l, c), m_value (v), m_orig_text (ot) { } - // No copying! - - tree_constant (const tree_constant&) = delete; - - tree_constant& operator = (const tree_constant&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_constant) ~tree_constant () = default;
--- a/libinterp/parse-tree/pt-decl.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-decl.h Thu Feb 16 14:43:18 2023 -0500 @@ -59,11 +59,7 @@ tree_decl_elt (tree_identifier *i, tree_expression *e = nullptr); - // No copying! - - tree_decl_elt (const tree_decl_elt&) = delete; - - tree_decl_elt& operator = (const tree_decl_elt&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_decl_elt) ~tree_decl_elt (); @@ -117,11 +113,7 @@ tree_decl_init_list (tree_decl_elt *t) { append (t); } - // No copying! - - tree_decl_init_list (const tree_decl_init_list&) = delete; - - tree_decl_init_list& operator = (const tree_decl_init_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_decl_init_list) ~tree_decl_init_list () { @@ -178,11 +170,7 @@ tree_decl_command (const std::string& n, tree_decl_init_list *t, int l = -1, int c = -1); - // No copying! - - tree_decl_command (const tree_decl_command&) = delete; - - tree_decl_command& operator = (const tree_decl_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_decl_command) ~tree_decl_command ();
--- a/libinterp/parse-tree/pt-eval.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-eval.h Thu Feb 16 14:43:18 2023 -0500 @@ -148,11 +148,7 @@ m_index_position (0), m_num_indices (0) { } - // No copying! - - tree_evaluator (const tree_evaluator&) = delete; - - tree_evaluator& operator = (const tree_evaluator&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_evaluator) ~tree_evaluator () = default;
--- a/libinterp/parse-tree/pt-except.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-except.h Thu Feb 16 14:43:18 2023 -0500 @@ -59,11 +59,7 @@ m_expr_id (id), m_lead_comm (cl), m_mid_comm (cm), m_trail_comm (ct) { } - // No copying! - - tree_try_catch_command (const tree_try_catch_command&) = delete; - - tree_try_catch_command& operator = (const tree_try_catch_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_try_catch_command) ~tree_try_catch_command (); @@ -127,12 +123,7 @@ m_lead_comm (cl), m_mid_comm (cm), m_trail_comm (ct) { } - // No copying! - - tree_unwind_protect_command (const tree_unwind_protect_command&) = delete; - - tree_unwind_protect_command& - operator = (const tree_unwind_protect_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_unwind_protect_command) ~tree_unwind_protect_command ();
--- a/libinterp/parse-tree/pt-exp.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-exp.h Thu Feb 16 14:43:18 2023 -0500 @@ -51,11 +51,7 @@ : tree (l, c), m_num_parens (0), m_postfix_index_type ('\0'), m_for_cmd_expr (false), m_print_flag (false) { } - // No copying! - - tree_expression (const tree_expression&) = delete; - - tree_expression& operator = (const tree_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_expression) virtual ~tree_expression () = default;
--- a/libinterp/parse-tree/pt-fcn-handle.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-fcn-handle.h Thu Feb 16 14:43:18 2023 -0500 @@ -55,11 +55,7 @@ tree_fcn_handle (const std::string& n, int l = -1, int c = -1) : tree_expression (l, c), m_name (n) { } - // No copying! - - tree_fcn_handle (const tree_fcn_handle&) = delete; - - tree_fcn_handle& operator = (const tree_fcn_handle&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_fcn_handle) ~tree_fcn_handle () = default; @@ -111,11 +107,7 @@ m_scope (scope), m_parent_scope (parent_scope), m_file_name () { } - // No copying! - - tree_anon_fcn_handle (const tree_anon_fcn_handle&) = delete; - - tree_anon_fcn_handle& operator = (const tree_anon_fcn_handle&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_anon_fcn_handle) ~tree_anon_fcn_handle ();
--- a/libinterp/parse-tree/pt-id.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-id.h Thu Feb 16 14:43:18 2023 -0500 @@ -60,11 +60,7 @@ int l = -1, int c = -1) : tree_expression (l, c), m_sym (s) { } - // No copying! - - tree_identifier (const tree_identifier&) = delete; - - tree_identifier& operator = (const tree_identifier&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_identifier) ~tree_identifier () = default;
--- a/libinterp/parse-tree/pt-idx.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-idx.h Thu Feb 16 14:43:18 2023 -0500 @@ -62,11 +62,7 @@ tree_index_expression (tree_expression *e, tree_expression *df, int l = -1, int c = -1); - // No copying! - - tree_index_expression (const tree_index_expression&) = delete; - - tree_index_expression& operator = (const tree_index_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_index_expression) ~tree_index_expression ();
--- a/libinterp/parse-tree/pt-jump.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-jump.h Thu Feb 16 14:43:18 2023 -0500 @@ -42,11 +42,7 @@ tree_break_command (int l = -1, int c = -1) : tree_command (l, c) { } - // No copying! - - tree_break_command (const tree_break_command&) = delete; - - tree_break_command& operator = (const tree_break_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_break_command) ~tree_break_command () = default; @@ -65,11 +61,7 @@ tree_continue_command (int l = -1, int c = -1) : tree_command (l, c) { } - // No copying! - - tree_continue_command (const tree_continue_command&) = delete; - - tree_continue_command& operator = (const tree_continue_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_continue_command) ~tree_continue_command () = default; @@ -88,11 +80,7 @@ tree_return_command (int l = -1, int c = -1) : tree_command (l, c) { } - // No copying! - - tree_return_command (const tree_return_command&) = delete; - - tree_return_command& operator = (const tree_return_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_return_command) ~tree_return_command () = default;
--- a/libinterp/parse-tree/pt-loop.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-loop.h Thu Feb 16 14:43:18 2023 -0500 @@ -66,11 +66,7 @@ m_trail_comm (tc) { } - // No copying! - - tree_while_command (const tree_while_command&) = delete; - - tree_while_command& operator = (const tree_while_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_while_command) ~tree_while_command (); @@ -126,11 +122,7 @@ : tree_while_command (e, lst, lc, tc, l, c) { } - // No copying! - - tree_do_until_command (const tree_do_until_command&) = delete; - - tree_do_until_command& operator = (const tree_do_until_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_do_until_command) ~tree_do_until_command () = default; @@ -164,11 +156,7 @@ m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_simple_for_command (const tree_simple_for_command&) = delete; - - tree_simple_for_command& operator = (const tree_simple_for_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_simple_for_command) ~tree_simple_for_command (); @@ -234,11 +222,7 @@ m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_complex_for_command (const tree_complex_for_command&) = delete; - - tree_complex_for_command& operator = (const tree_complex_for_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_complex_for_command) ~tree_complex_for_command ();
--- a/libinterp/parse-tree/pt-mat.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-mat.h Thu Feb 16 14:43:18 2023 -0500 @@ -54,11 +54,7 @@ : tree_array_list (row, l, c) { } - // No copying! - - tree_matrix (const tree_matrix&) = delete; - - tree_matrix& operator = (const tree_matrix&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_matrix) ~tree_matrix () = default;
--- a/libinterp/parse-tree/pt-misc.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-misc.h Thu Feb 16 14:43:18 2023 -0500 @@ -68,11 +68,7 @@ append (new tree_decl_elt (id)); } - // No copying! - - tree_parameter_list (const tree_parameter_list&) = delete; - - tree_parameter_list& operator = (const tree_parameter_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_parameter_list) ~tree_parameter_list ();
--- a/libinterp/parse-tree/pt-pr-code.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-pr-code.h Thu Feb 16 14:43:18 2023 -0500 @@ -58,11 +58,7 @@ m_nesting.push ('n'); } - // No copying! - - tree_print_code (const tree_print_code&) = delete; - - tree_print_code& operator = (const tree_print_code&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_print_code) ~tree_print_code () = default;
--- a/libinterp/parse-tree/pt-select.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-select.h Thu Feb 16 14:43:18 2023 -0500 @@ -57,11 +57,7 @@ int l = -1, int c = -1) : tree (l, c), m_expr (e), m_list (sl), m_lead_comm (lc) { } - // No copying! - - tree_if_clause (const tree_if_clause&) = delete; - - tree_if_clause& operator = (const tree_if_clause&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_if_clause) ~tree_if_clause (); @@ -98,11 +94,7 @@ tree_if_command_list (tree_if_clause *t) { append (t); } - // No copying! - - tree_if_command_list (const tree_if_command_list&) = delete; - - tree_if_command_list& operator = (const tree_if_command_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_if_command_list) ~tree_if_command_list () { @@ -134,11 +126,7 @@ : tree_command (l, c), m_list (lst), m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_if_command (const tree_if_command&) = delete; - - tree_if_command& operator = (const tree_if_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_if_command) ~tree_if_command (); @@ -184,11 +172,7 @@ int l = -1, int c = -1) : tree (l, c), m_label (e), m_list (sl), m_lead_comm (lc) { } - // No copying! - - tree_switch_case (const tree_switch_case&) = delete; - - tree_switch_case& operator = (const tree_switch_case&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_switch_case) ~tree_switch_case (); @@ -225,11 +209,7 @@ tree_switch_case_list (tree_switch_case *t) { append (t); } - // No copying! - - tree_switch_case_list (const tree_switch_case_list&) = delete; - - tree_switch_case_list& operator = (const tree_switch_case_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_switch_case_list) ~tree_switch_case_list () { @@ -261,11 +241,7 @@ : tree_command (l, c), m_expr (e), m_list (lst), m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_switch_command (const tree_switch_command&) = delete; - - tree_switch_command& operator = (const tree_switch_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_switch_command) ~tree_switch_command ();
--- a/libinterp/parse-tree/pt-spmd.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-spmd.h Thu Feb 16 14:43:18 2023 -0500 @@ -48,11 +48,7 @@ : tree_command (l, c), m_body (body), m_lead_comm (lc), m_trail_comm (tc) { } - // No copying! - - tree_spmd_command (const tree_spmd_command&) = delete; - - tree_spmd_command& operator = (const tree_spmd_command&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_spmd_command) ~tree_spmd_command ();
--- a/libinterp/parse-tree/pt-stmt.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-stmt.h Thu Feb 16 14:43:18 2023 -0500 @@ -63,11 +63,7 @@ tree_statement (tree_expression *e, comment_list *cl) : m_command (nullptr), m_expression (e), m_comment_list (cl) { } - // No copying! - - tree_statement (const tree_statement&) = delete; - - tree_statement& operator = (const tree_statement&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_statement) ~tree_statement (); @@ -152,11 +148,7 @@ : m_function_body (false), m_anon_function_body (false), m_script_body (false) { append (s); } - // No copying! - - tree_statement_list (const tree_statement_list&) = delete; - - tree_statement_list& operator = (const tree_statement_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_statement_list) ~tree_statement_list () {
--- a/libinterp/parse-tree/pt-tm-const.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-tm-const.h Thu Feb 16 14:43:18 2023 -0500 @@ -199,11 +199,7 @@ init (tm); } - // No copying! - - tm_const (const tm_const&) = delete; - - tm_const& operator = (const tm_const&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tm_const) ~tm_const () = default;
--- a/libinterp/parse-tree/pt-unop.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-unop.h Thu Feb 16 14:43:18 2023 -0500 @@ -59,11 +59,7 @@ public: - // No copying! - - tree_unary_expression (const tree_unary_expression&) = delete; - - tree_unary_expression& operator = (const tree_unary_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_unary_expression) ~tree_unary_expression () { delete m_op; } @@ -98,11 +94,7 @@ = octave_value::unknown_unary_op) : tree_unary_expression (e, l, c, t) { } - // No copying! - - tree_prefix_expression (const tree_prefix_expression&) = delete; - - tree_prefix_expression& operator = (const tree_prefix_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_prefix_expression) ~tree_prefix_expression () = default; @@ -139,11 +131,7 @@ = octave_value::unknown_unary_op) : tree_unary_expression (e, l, c, t) { } - // No copying! - - tree_postfix_expression (const tree_postfix_expression&) = delete; - - tree_postfix_expression& operator = (const tree_postfix_expression&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_postfix_expression) ~tree_postfix_expression () = default;
--- a/libinterp/parse-tree/pt-walk.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt-walk.h Thu Feb 16 14:43:18 2023 -0500 @@ -117,11 +117,7 @@ public: - // No copying! - - tree_walker (const tree_walker&) = delete; - - tree_walker& operator = (const tree_walker&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree_walker) virtual void visit_anon_fcn_handle (tree_anon_fcn_handle&);
--- a/libinterp/parse-tree/pt.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/pt.h Thu Feb 16 14:43:18 2023 -0500 @@ -49,11 +49,7 @@ : m_line_num (l), m_column_num (c), m_bp_cond (nullptr) { } - // No copying! - - tree (const tree&) = delete; - - tree& operator = (const tree&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tree) virtual ~tree () = default;
--- a/libinterp/parse-tree/token.h Thu Feb 16 08:55:58 2023 -0500 +++ b/libinterp/parse-tree/token.h Thu Feb 16 14:43:18 2023 -0500 @@ -89,11 +89,7 @@ token (int tv, const std::string& mth, const std::string& cls, const filepos& beg_pos, const filepos& end_pos); - // No copying! - - token (const token&) = delete; - - token& operator = (const token&) = delete; + OCTAVE_DISABLE_COPY_MOVE (token) ~token (); @@ -162,9 +158,7 @@ : m_superclass_info (new superclass_info (meth, cls)) { } - tok_info (const tok_info&) = delete; - - tok_info& operator = (const tok_info&) = delete; + OCTAVE_DISABLE_COPY_MOVE (tok_info) ~tok_info () { } @@ -183,9 +177,7 @@ superclass_info () = delete; - superclass_info (const superclass_info&) = delete; - - superclass_info& operator = (const superclass_info&) = delete; + OCTAVE_DISABLE_COPY_MOVE (superclass_info) ~superclass_info () = default;
--- a/liboctave/array/Array-base.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/array/Array-base.cc Thu Feb 16 14:43:18 2023 -0500 @@ -350,11 +350,7 @@ } - // No copying! - - rec_permute_helper (const rec_permute_helper&) = delete; - - rec_permute_helper& operator = (const rec_permute_helper&) = delete; + OCTAVE_DISABLE_COPY_MOVE (rec_permute_helper) ~rec_permute_helper () { delete [] m_dim; } @@ -555,11 +551,7 @@ } } - // No copying! - - rec_index_helper (const rec_index_helper&) = delete; - - rec_index_helper& operator = (const rec_index_helper&) = delete; + OCTAVE_DISABLE_COPY_MOVE (rec_index_helper) ~rec_index_helper () { delete [] m_idx; delete [] m_dim; } @@ -671,11 +663,7 @@ m_cext[0] *= ld; } - // No copying! - - rec_resize_helper (const rec_resize_helper&) = delete; - - rec_resize_helper& operator = (const rec_resize_helper&) = delete; + OCTAVE_DISABLE_COPY_MOVE (rec_resize_helper) ~rec_resize_helper () { delete [] m_cext; }
--- a/liboctave/array/idx-vector.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/array/idx-vector.h Thu Feb 16 14:43:18 2023 -0500 @@ -80,11 +80,7 @@ idx_base_rep () : m_count (1) { } - // No copying! - - idx_base_rep (const idx_base_rep&) = delete; - - idx_base_rep& operator = (const idx_base_rep&) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_base_rep) virtual ~idx_base_rep () = default; @@ -131,11 +127,7 @@ OCTAVE_API idx_colon_rep (char c); - // No copying! - - idx_colon_rep (const idx_colon_rep& idx) = delete; - - idx_colon_rep& operator = (const idx_colon_rep& idx) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_colon_rep) octave_idx_type xelem (octave_idx_type i) const { return i; } @@ -178,11 +170,7 @@ OCTAVE_API idx_range_rep (const range<double>&); - // No copying! - - idx_range_rep (const idx_range_rep& idx) = delete; - - idx_range_rep& operator = (const idx_range_rep& idx) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_range_rep) octave_idx_type xelem (octave_idx_type i) const { return m_start + i * m_step; } @@ -232,11 +220,7 @@ idx_scalar_rep (octave_idx_type i, direct) : idx_base_rep (), m_data (i) { } - // No copying! - - idx_scalar_rep (const idx_scalar_rep& idx) = delete; - - idx_scalar_rep& operator = (const idx_scalar_rep& idx) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_scalar_rep) // Zero-based constructor. OCTAVE_API idx_scalar_rep (octave_idx_type i); @@ -308,11 +292,7 @@ OCTAVE_API idx_vector_rep (const Sparse<bool>&); - // No copying! - - idx_vector_rep (const idx_vector_rep& idx) = delete; - - idx_vector_rep& operator = (const idx_vector_rep& idx) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_vector_rep) ~idx_vector_rep (); @@ -377,11 +357,7 @@ OCTAVE_API idx_mask_rep (const Array<bool>&, octave_idx_type = -1); - // No copying! - - idx_mask_rep (const idx_mask_rep& idx) = delete; - - idx_mask_rep& operator = (const idx_mask_rep& idx) = delete; + OCTAVE_DISABLE_COPY_MOVE (idx_mask_rep) OCTAVE_API ~idx_mask_rep ();
--- a/liboctave/numeric/oct-fftw.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/numeric/oct-fftw.h Thu Feb 16 14:43:18 2023 -0500 @@ -47,11 +47,7 @@ public: - // No copying! - - fftw_planner (const fftw_planner&) = delete; - - fftw_planner& operator = (const fftw_planner&) = delete; + OCTAVE_DISABLE_COPY_MOVE (fftw_planner) ~fftw_planner (); @@ -193,12 +189,7 @@ public: - // No copying! - - float_fftw_planner (const float_fftw_planner&) = delete; - - float_fftw_planner& - operator = (const float_fftw_planner&) = delete; + OCTAVE_DISABLE_COPY_MOVE (float_fftw_planner) ~float_fftw_planner (); @@ -338,11 +329,7 @@ fftw () = delete; - // No copying. - - fftw (const fftw&) = delete; - - fftw& operator = (const fftw&) = delete; + OCTAVE_DISABLE_COPY_MOVE (fftw) static int fft (const double *in, Complex *out, std::size_t npts, std::size_t nsamples = 1, octave_idx_type stride = 1,
--- a/liboctave/numeric/sparse-chol.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/numeric/sparse-chol.cc Thu Feb 16 14:43:18 2023 -0500 @@ -76,11 +76,7 @@ info = init (a, natural, force); } - // No copying! - - sparse_chol_rep (const sparse_chol_rep&) = delete; - - sparse_chol_rep& operator = (const sparse_chol_rep&) = delete; + OCTAVE_DISABLE_COPY_MOVE (sparse_chol_rep) ~sparse_chol_rep () {
--- a/liboctave/numeric/sparse-qr.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/numeric/sparse-qr.cc Thu Feb 16 14:43:18 2023 -0500 @@ -75,11 +75,7 @@ sparse_qr_rep (const SPARSE_T& a, int order); - // No copying! - - sparse_qr_rep (const sparse_qr_rep&) = delete; - - sparse_qr_rep& operator = (const sparse_qr_rep&) = delete; + OCTAVE_DISABLE_COPY_MOVE (sparse_qr_rep) ~sparse_qr_rep ();
--- a/liboctave/system/oct-env.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/system/oct-env.h Thu Feb 16 14:43:18 2023 -0500 @@ -44,11 +44,7 @@ public: - // No copying! - - env (const env&) = delete; - - env& operator = (const env&) = delete; + OCTAVE_DISABLE_COPY_MOVE (env) static std::string polite_directory_format (const std::string& name);
--- a/liboctave/util/action-container.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/action-container.h Thu Feb 16 14:43:18 2023 -0500 @@ -54,11 +54,7 @@ elem () { } - // No copying! - - elem (const elem&) = delete; - - elem& operator = (const elem&) = delete; + OCTAVE_DISABLE_COPY_MOVE (elem) virtual ~elem () = default; @@ -96,11 +92,7 @@ restore_var_elem (T& ref, const T& val) : m_ptr (&ref), m_val (val) { } - // No copying! - - restore_var_elem (const restore_var_elem&) = delete; - - restore_var_elem& operator = (const restore_var_elem&) = delete; + OCTAVE_DISABLE_COPY_MOVE (restore_var_elem) void run () { *m_ptr = m_val; } @@ -119,11 +111,7 @@ delete_ptr_elem (T *ptr) : m_ptr (ptr) { } - // No copying! - - delete_ptr_elem (const delete_ptr_elem&) = delete; - - delete_ptr_elem operator = (const delete_ptr_elem&) = delete; + OCTAVE_DISABLE_COPY_MOVE (delete_ptr_elem) void run () { delete m_ptr; } @@ -134,11 +122,7 @@ action_container () { } - // No copying! - - action_container (const action_container&) = delete; - - action_container& operator = (const action_container&) = delete; + OCTAVE_DISABLE_COPY_MOVE (action_container) virtual ~action_container () = default;
--- a/liboctave/util/cmd-edit.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/cmd-edit.cc Thu Feb 16 14:43:18 2023 -0500 @@ -936,11 +936,7 @@ default_command_editor () : command_editor (), m_input_stream (stdin), m_output_stream (stdout) { } - // No copying! - - default_command_editor (const default_command_editor&) = delete; - - default_command_editor& operator = (const default_command_editor&) = delete; + OCTAVE_DISABLE_COPY_MOVE (default_command_editor) ~default_command_editor () = default;
--- a/liboctave/util/cmd-edit.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/cmd-edit.h Thu Feb 16 14:43:18 2023 -0500 @@ -68,11 +68,7 @@ typedef void (*user_accept_line_fcn) (const std::string&); - // No copying! - - command_editor (const command_editor&) = delete; - - command_editor& operator = (const command_editor&) = delete; + OCTAVE_DISABLE_COPY_MOVE (command_editor) virtual ~command_editor () = default;
--- a/liboctave/util/cmd-hist.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/cmd-hist.h Thu Feb 16 14:43:18 2023 -0500 @@ -48,11 +48,7 @@ public: - // No copying! - - command_history (const command_history&) = delete; - - command_history& operator = (const command_history&) = delete; + OCTAVE_DISABLE_COPY_MOVE (command_history) virtual ~command_history () = default;
--- a/liboctave/util/oct-mutex.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/oct-mutex.h Thu Feb 16 14:43:18 2023 -0500 @@ -101,11 +101,7 @@ m_lock_result = m_mutex.try_lock (); } - // No copying. - - autolock (const autolock&) = delete; - - autolock& operator = (const autolock&) = delete; + OCTAVE_DISABLE_COPY_MOVE (autolock) ~autolock () {
--- a/liboctave/util/oct-refcount.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/oct-refcount.h Thu Feb 16 14:43:18 2023 -0500 @@ -45,9 +45,7 @@ : m_count (initial_count) { } - refcount (const refcount&) = delete; - - refcount& operator = (const refcount&) = delete; + OCTAVE_DISABLE_COPY_MOVE (refcount) ~refcount () = default;
--- a/liboctave/util/oct-shlib.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/oct-shlib.cc Thu Feb 16 14:43:18 2023 -0500 @@ -178,11 +178,7 @@ octave_dlopen_shlib (const std::string& f); - // No copying! - - octave_dlopen_shlib (const octave_dlopen_shlib&) = delete; - - octave_dlopen_shlib& operator = (const octave_dlopen_shlib&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_dlopen_shlib) ~octave_dlopen_shlib (); @@ -284,11 +280,7 @@ octave_w32_shlib (const std::string& f); - // No copying! - - octave_w32_shlib (const octave_w32_shlib&) = delete; - - octave_w32_shlib& operator = (const octave_w32_shlib&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_w32_shlib) ~octave_w32_shlib ();
--- a/liboctave/util/oct-sort.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/oct-sort.h Thu Feb 16 14:43:18 2023 -0500 @@ -110,11 +110,7 @@ octave_sort (const compare_fcn_type&); - // No copying! - - octave_sort (const octave_sort&) = delete; - - octave_sort& operator = (const octave_sort&) = delete; + OCTAVE_DISABLE_COPY_MOVE (octave_sort) ~octave_sort (); @@ -203,11 +199,7 @@ : m_min_gallop (), m_a (nullptr), m_ia (nullptr), m_alloced (0), m_n (0) { reset (); } - // No copying! - - MergeState (const MergeState&) = delete; - - MergeState& operator = (const MergeState&) = delete; + OCTAVE_DISABLE_COPY_MOVE (MergeState) ~MergeState () { delete [] m_a; delete [] m_ia; }
--- a/liboctave/util/oct-string.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/oct-string.h Thu Feb 16 14:43:18 2023 -0500 @@ -178,11 +178,7 @@ { public: - // No copying! - - codecvt_u8 (codecvt_u8&) = delete; - - codecvt_u8& operator = (codecvt_u8&) = delete; + OCTAVE_DISABLE_COPY_MOVE (codecvt_u8) codecvt_u8 (const std::string& enc) : m_enc (enc)
--- a/liboctave/util/singleton-cleanup.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/singleton-cleanup.h Thu Feb 16 14:43:18 2023 -0500 @@ -42,11 +42,7 @@ typedef void (*fptr) (); - // No copying! - - singleton_cleanup_list (const singleton_cleanup_list&) = delete; - - singleton_cleanup_list& operator = (const singleton_cleanup_list&) = delete; + OCTAVE_DISABLE_COPY_MOVE (singleton_cleanup_list) ~singleton_cleanup_list ();
--- a/liboctave/util/unwind-prot.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/unwind-prot.h Thu Feb 16 14:43:18 2023 -0500 @@ -45,11 +45,7 @@ unwind_protect () : m_lifo () { } - // No copying! - - unwind_protect (const unwind_protect&) = delete; - - unwind_protect& operator = (const unwind_protect&) = delete; + OCTAVE_DISABLE_COPY_MOVE (unwind_protect) // Destructor should not raise an exception, so all actions // registered should be exception-safe. If you're not sure, see @@ -108,11 +104,7 @@ unwind_protect_safe () : unwind_protect () { } - // No copying! - - unwind_protect_safe (const unwind_protect_safe&) = delete; - - unwind_protect_safe& operator = (const unwind_protect_safe&) = delete; + OCTAVE_DISABLE_COPY_MOVE (unwind_protect_safe) ~unwind_protect_safe () { @@ -176,11 +168,7 @@ : m_fcn (std::bind (fcn, args...)) { } - // No copying! - - unwind_action (const unwind_action&) = delete; - - unwind_action& operator = (const unwind_action&) = delete; + OCTAVE_DISABLE_COPY_MOVE (unwind_action) ~unwind_action () { run (); } @@ -234,11 +222,7 @@ : m_fcn (std::bind (fcn, args...)) { } - // No copying! - - unwind_action_safe (const unwind_action_safe&) = delete; - - unwind_action_safe& operator = (const unwind_action_safe&) = delete; + OCTAVE_DISABLE_COPY_MOVE (unwind_action_safe) ~unwind_action_safe () { run (); } @@ -333,11 +317,7 @@ m_ref = new_val; } - // No copying! - - unwind_protect_var (const unwind_protect_var&) = delete; - - unwind_protect_var& operator = (const unwind_protect_var&) = delete; + OCTAVE_DISABLE_COPY_MOVE (unwind_protect_var) ~unwind_protect_var () {
--- a/liboctave/util/url-transfer.cc Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/url-transfer.cc Thu Feb 16 14:43:18 2023 -0500 @@ -352,11 +352,7 @@ SETOPT (CURLOPT_HTTPGET, 1); } - // No copying! - - curl_transfer (const curl_transfer&) = delete; - - curl_transfer& operator = (const curl_transfer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (curl_transfer); ~curl_transfer () {
--- a/liboctave/util/url-transfer.h Thu Feb 16 08:55:58 2023 -0500 +++ b/liboctave/util/url-transfer.h Thu Feb 16 14:43:18 2023 -0500 @@ -68,11 +68,7 @@ base_url_transfer (const std::string& url, std::ostream& os); - // No copying! - - base_url_transfer (const base_url_transfer&) = delete; - - base_url_transfer& operator = (const base_url_transfer&) = delete; + OCTAVE_DISABLE_COPY_MOVE (base_url_transfer) virtual ~base_url_transfer () = default;