|
From: | Michael Goffioul |
Subject: | Re: octave_base_value::print const-ness and method overload |
Date: | Mon, 27 Jan 2014 07:28:34 -0500 |
Hmm. It seems like it would be better to have more const methods rather than fewer and it makes sense to me that this print method should be const since it is not changing the object, just displaying it. Would it be better to make the reference count mutable? Or would that get us into trouble in some other ways?On 01/25/2014 05:00 PM, Michael Goffioul wrote:
Hi John,
Would you mind having a quick look at the patch attached? This
implements disp/display overload in classdef, by using the following
mapping:
- print -> disp
- print_with_name -> display
There's a ugly hack in octave_classdef::print due to the const-ness of
the method. Not really proud of it, but it was more a proof of concept.
The question is whether it would be better to remove the const-ness of
the method (as for print_with_name) instead?
[Prev in Thread] | Current Thread | [Next in Thread] |