Mercurial > octave
diff libinterp/octave-value/ov-base-scalar.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 | bdcb5c1aaf4f |
children | b442ec6dda5c |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base-scalar.h Thu Mar 14 17:52:30 2019 -0700 +++ b/libinterp/octave-value/ov-base-scalar.h Fri Mar 15 05:45:27 2019 +0000 @@ -61,6 +61,11 @@ octave_value full_value (void) const { return scalar; } + // 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);