Quantcast

elem vs. xelem vs. checkelem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

elem vs. xelem vs. checkelem

Rik-4
jwe,

I'm getting the following warning during compilation:

libinterp/octave-value/ov-lazy-idx.cc:75:36: warning: ‘octave_idx_type
idx_vector::checkelem(octave_idx_type) const’ is deprecated: use 'elem'
instead [-Wdeprecated-declarations]

Besides needing a fix, when should checkelem be used in preference to elem
or xelem?

--Rik


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: elem vs. xelem vs. checkelem

John W. Eaton
Administrator
On 05/15/2017 05:17 PM, Rik wrote:
> jwe,
>
> I'm getting the following warning during compilation:
>
> libinterp/octave-value/ov-lazy-idx.cc:75:36: warning: ‘octave_idx_type
> idx_vector::checkelem(octave_idx_type) const’ is deprecated: use 'elem'
> instead [-Wdeprecated-declarations]

For now, I removed the OCTAVE_DEPRECATED attribute.

> Besides needing a fix, when should checkelem be used in preference to elem
> or xelem?

I'm not sure yet.  I thought we could deprecated eliminate the checkelem
functions now, but some of them throw index exceptions and those are
needed for proper error reporting.

jwe



Loading...