diff libinterp/parse-tree/pt-decl.h @ 22869:f75d289645ec

make deleted functions public * octave-gui.h, resource-manager.h, shortcut-manager.h, base-text-renderer.h, c-file-ptr-stream.h, dynamic-ld.cc, dynamic-ld.h, event-queue.h, ft-text-renderer.cc, gl-render.cc, gl-render.h, graphics.cc, graphics.in.h, interpreter.h, mex.cc, mxarray.in.h, oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-procbuf.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, octave-link.h, pager.h, profiler.h, sighandlers.cc, symtab.h, text-renderer.h, zfstream.h, __init_fltk__.cc, ov-builtin.h, ov-dld-fcn.h, ov-fcn.h, ov-mex-fcn.h, ov-typeinfo.h, ov-usr-fcn.h, octave.h, lex.h, parse.h, pt-arg-list.h, pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.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-funcall.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-stmt.h, pt-unop.h, pt-walk.h, pt.h, token.h, Array.cc, idx-vector.h, oct-fftw.h, sparse-chol.cc, sparse-qr.cc, file-ops.h, mach-info.h, oct-env.h, action-container.h, cmd-edit.cc, cmd-edit.h, cmd-hist.h, oct-locbuf.h, oct-mutex.h, oct-shlib.cc, oct-sort.h, pathsearch.h, singleton-cleanup.h, unwind-prot.h, url-transfer.cc, url-transfer.h: Declare deleted copy constructors and assignment operators public.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2016 12:40:45 -0500
parents 87e3163f6c87
children 4e3d47dc7e25
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-decl.h	Tue Dec 06 10:59:29 2016 -0500
+++ b/libinterp/parse-tree/pt-decl.h	Tue Dec 06 12:40:45 2016 -0500
@@ -48,6 +48,12 @@
   tree_decl_elt (tree_identifier *i = 0, tree_expression *e = 0)
     : id (i), expr (e) { }
 
+  // No copying!
+
+  tree_decl_elt (const tree_decl_elt&) = delete;
+
+  tree_decl_elt& operator = (const tree_decl_elt&) = delete;
+
   ~tree_decl_elt (void);
 
   bool eval (void);
@@ -102,12 +108,6 @@
 
   // An initializer expression (may be zero);
   tree_expression *expr;
-
-  // No copying!
-
-  tree_decl_elt (const tree_decl_elt&) = delete;
-
-  tree_decl_elt& operator = (const tree_decl_elt&) = delete;
 };
 
 class
@@ -119,6 +119,12 @@
 
   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;
+
   ~tree_decl_init_list (void)
   {
     while (! empty ())
@@ -133,14 +139,6 @@
                             symbol_table::context_id context) const;
 
   void accept (tree_walker& tw);
-
-private:
-
-  // No copying!
-
-  tree_decl_init_list (const tree_decl_init_list&) = delete;
-
-  tree_decl_init_list& operator = (const tree_decl_init_list&) = delete;
 };
 
 // Base class for declaration commands -- global, static, etc.
@@ -157,6 +155,12 @@
                      int l = -1, int c = -1)
     : tree_command (l, c), cmd_name (n), init_list (t) { }
 
+  // No copying!
+
+  tree_decl_command (const tree_decl_command&) = delete;
+
+  tree_decl_command& operator = (const tree_decl_command&) = delete;
+
   ~tree_decl_command (void);
 
   tree_decl_init_list *initializer_list (void) { return init_list; }
@@ -170,14 +174,6 @@
 
   // The list of variables or initializers in this declaration command.
   tree_decl_init_list *init_list;
-
-private:
-
-  // No copying!
-
-  tree_decl_command (const tree_decl_command&) = delete;
-
-  tree_decl_command& operator = (const tree_decl_command&) = delete;
 };
 
 // Global.
@@ -193,6 +189,12 @@
   tree_global_command (tree_decl_init_list *t, int l = -1, int c = -1)
     : tree_decl_command ("global", t, l, c) { }
 
+  // No copying!
+
+  tree_global_command (const tree_global_command&) = delete;
+
+  tree_global_command& operator = (const tree_global_command&) = delete;
+
   ~tree_global_command (void) = default;
 
   tree_command *dup (symbol_table::scope_id scope,
@@ -203,12 +205,6 @@
 private:
 
   static void do_init (tree_decl_elt& elt);
-
-  // No copying!
-
-  tree_global_command (const tree_global_command&) = delete;
-
-  tree_global_command& operator = (const tree_global_command&) = delete;
 };
 
 // Persistent.
@@ -224,6 +220,12 @@
   tree_persistent_command (tree_decl_init_list *t, int l = -1, int c = -1)
     : tree_decl_command ("persistent", t, l, c) { }
 
+  // No copying!
+
+  tree_persistent_command (const tree_persistent_command&) = delete;
+
+  tree_persistent_command& operator = (const tree_persistent_command&) = delete;
+
   ~tree_persistent_command (void) = default;
 
   tree_command *dup (symbol_table::scope_id scope,
@@ -234,12 +236,6 @@
 private:
 
   static void do_init (tree_decl_elt& elt);
-
-  // No copying!
-
-  tree_persistent_command (const tree_persistent_command&) = delete;
-
-  tree_persistent_command& operator = (const tree_persistent_command&) = delete;
 };
 
 #endif