diff libinterp/octave-value/ov-range.h @ 26916:9cd4b045fe3d

avoid some overloaded virtual warnings (bug #55741) * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.h, ov-class.h, ov-classdef.h, ov-cs-list.h, ov-fcn-handle.h, ov-java.h, ov-lazy-idx.h, ov-perm.h, ov-range.h: Avoid overloaded virtual method warnings for classes derived from octave_base_value that partially overload the three virtual subsref methods by adding using declarations.
author John W. Eaton <jwe@octave.org>
date Fri, 15 Mar 2019 05:45:27 +0000
parents db5c5e6c2371
children b442ec6dda5c
line wrap: on
line diff
--- a/libinterp/octave-value/ov-range.h	Thu Mar 14 17:52:30 2019 -0700
+++ b/libinterp/octave-value/ov-range.h	Fri Mar 15 05:45:27 2019 +0000
@@ -93,6 +93,11 @@
 
   octave_base_value * try_narrowing_conversion (void);
 
+  // We don't need to override all three forms of subsref.  The using
+  // declaration will avoid warnings about partially-overloaded virtual
+  // functions.
+  using octave_base_value::subsref;
+
   octave_value subsref (const std::string& type,
                         const std::list<octave_value_list>& idx);