octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave_base_value::print const-ness and method overload


From: Michael Goffioul
Subject: Re: octave_base_value::print const-ness and method overload
Date: Mon, 27 Jan 2014 11:32:54 -0500

On Mon, Jan 27, 2014 at 11:29 AM, John W. Eaton <address@hidden> wrote:
On 01/27/2014 07:28 AM, Michael Goffioul wrote:

I thought also about that solution, but that's only part of the problem.
You're still unable to compile, because you can't call the private
constructor octave_value(const octave_base_value*).

OK.  In that case, I think it is better to remove the const qualifier on the print method than it is to use const_cast to cast away const.

The only concern I have there is that this will potentially break all classes inheriting from octave_base_value. The ones in octave source tree can be fixed, but not the others (like in forge packages). Not sure there's an easy solution in any case.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]