Mercurial > hg > octave-lyh
diff liboctave/oct-inttypes.h @ 7198:4555c116b420
[project @ 2007-11-27 03:06:10 by jwe]
author | jwe |
---|---|
date | Tue, 27 Nov 2007 03:06:10 +0000 |
parents | 57d2546ad8d5 |
children | 8c32f95c2639 ca0e5cfe59d1 |
line wrap: on
line diff
--- a/liboctave/oct-inttypes.h +++ b/liboctave/oct-inttypes.h @@ -250,15 +250,21 @@ OCTAVE_INT_FIT_TO_RANGE (- static_cast<double> (ival), T) : 0; } + bool bool_value (void) const { return static_cast<bool> (value ()); } + + char char_value (void) const { return static_cast<char> (value ()); } + + double double_value (void) const { return static_cast<double> (value ()); } + + float float_value (void) const { return static_cast<float> (value ()); } + operator T (void) const { return value (); } - operator bool (void) const { return static_cast<bool> (value ()); } - - operator char (void) const { return static_cast<char> (value ()); } + // char and bool operators intentionally omitted. - operator double (void) const { return static_cast<double> (value ()); } + operator double (void) const { return double_value (); } - operator float (void) const { return static_cast<float> (value ()); } + operator float (void) const { return float_value (); } octave_int<T>& operator += (const octave_int<T>& x) {