comparison libinterp/octave-value/ov-classdef.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 2d65d46c620b
children 9dd1d8973877
comparison
equal deleted inserted replaced
26915:5ef01ab5c9e5 26916:9cd4b045fe3d
175 175
176 bool is_package (void) const { return object.is_package(); } 176 bool is_package (void) const { return object.is_package(); }
177 177
178 octave_function * function_value (bool = false) { return this; } 178 octave_function * function_value (bool = false) { return this; }
179 179
180 // We don't need to override all three forms of subsref. The using
181 // declaration will avoid warnings about partially-overloaded virtual
182 // functions.
183 using octave_function::subsref;
184
180 octave_value_list 185 octave_value_list
181 subsref (const std::string& type, 186 subsref (const std::string& type,
182 const std::list<octave_value_list>& idx, 187 const std::list<octave_value_list>& idx,
183 int nargout) 188 int nargout)
184 { 189 {