Mercurial > octave
comparison liboctave/array/Range.cc @ 30835:2989202f92f8 stable
only allow range<FLOAT> to be instantiated
* Range.h, Range.cc: Limit range<T> to floating point values.
* range-fwd.h: Update forward declaration of range<T>.
* ov-base.h, ov-base.cc, ov-range.h, ov-range.cc, ov.h, ov.cc,
pt-eval.cc: Temporarily comment out code that uses range<INT>
objects.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 17 Mar 2022 02:44:19 -0400 |
parents | 796f54d4ddbf |
children | 0f968958d7d5 e88a07dec498 |
comparison
equal
deleted
inserted
replaced
30834:f1a9e55d850c | 30835:2989202f92f8 |
---|---|
326 range<float>::init (void) | 326 range<float>::init (void) |
327 { | 327 { |
328 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); | 328 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); |
329 } | 329 } |
330 | 330 |
331 // For now, only define for float and double. | |
332 | |
333 #if 0 | |
334 | |
331 template <> | 335 template <> |
332 void | 336 void |
333 range<octave_int8>::init (void) | 337 range<octave_int8>::init (void) |
334 { | 338 { |
335 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); | 339 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); |
381 void | 385 void |
382 range<octave_uint64>::init (void) | 386 range<octave_uint64>::init (void) |
383 { | 387 { |
384 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); | 388 xinit (m_base, m_limit, m_increment, m_reverse, m_final, m_numel); |
385 } | 389 } |
390 | |
391 #endif | |
386 | 392 |
387 template <> | 393 template <> |
388 bool | 394 bool |
389 range<double>::is_storable (void) const | 395 range<double>::is_storable (void) const |
390 { | 396 { |