Mercurial > octave
diff libinterp/octave-value/ov.h @ 23913:062ce545b21e
mark octave_value from octave_value_list constructor explicit
* ov.h (octave_value (const octave_value_list&)): Tag with explicit.
* graphics.cc (get_property_from_handle): Return single octave_value,
not octave_value_list packaged as octave_value.
* pt-eval.cc (tree_evaluator::echo): Return octave_value(), not ovl().
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 14 Aug 2017 15:41:48 -0400 |
parents | 5aec653c88e7 |
children | 8e8dbabd6e84 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h Mon Aug 14 09:38:51 2017 -0400 +++ b/libinterp/octave-value/ov.h Mon Aug 14 15:41:48 2017 -0400 @@ -289,7 +289,9 @@ OCTAVE_DEPRECATED (4.4, "note: second argument is always ignored; use octave_value (const octave_value_list&) instead") octave_value (const octave_value_list& m, bool); - octave_value (const octave_value_list& m); + // This one is explicit because it can cause some trouble to + // accidentally create a cs-list when one was not intended. + explicit octave_value (const octave_value_list& m); octave_value (octave_value::magic_colon);