changeset 29946:3e5e88d9c85f

tag ArrayRep copy assignment operator with =delete * Array.h (ArrayRep::operator= (const ArrayRep&)): Tag with =delete instead of declaring it private and leaving it undefined.
author John W. Eaton <jwe@octave.org>
date Fri, 06 Aug 2021 11:19:28 -0400
parents 13e9e244284e
children 133abbad39d2
files liboctave/array/Array.h
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/Array.h	Thu Aug 05 11:47:53 2021 -0400
+++ b/liboctave/array/Array.h	Fri Aug 06 11:19:28 2021 -0400
@@ -177,11 +177,9 @@
 
     octave_idx_type numel (void) const { return m_len; }
 
-  private:
-
     // No assignment!
 
-    OCTARRAY_API ArrayRep& operator = (const ArrayRep& a);
+    ArrayRep& operator = (const ArrayRep&) = delete;
   };
 
   //--------------------------------------------------------------------