diff liboctave/util/oct-inttypes.h @ 21235:b48d65c5df5b stable

Disable char/int8_t function overloads where not permitted (bug #45411) * configure.ac (HAVE_OVERLOAD_CHAR_INT8_TYPES): Add test and conditional on whether the system allows overloads with char, int8_t, and uint8_t (e.g. Solaris does not). * oct_inttypes.h, oct-stream.cc: Use HAVE_OVERLOAD_CHAR_INT8_TYPES.
author Mike Miller <mtmiller@octave.org>
date Tue, 09 Feb 2016 11:54:02 -0800
parents 19755f4fc851
children 933083fee7ae f3f8e1d3e399
line wrap: on
line diff
--- a/liboctave/util/oct-inttypes.h	Tue Feb 09 10:34:35 2016 -0800
+++ b/liboctave/util/oct-inttypes.h	Tue Feb 09 11:54:02 2016 -0800
@@ -837,10 +837,12 @@
 
   octave_int (T i) : ival (i) { }
 
+#if defined (HAVE_OVERLOAD_CHAR_INT8_TYPES)
   // Always treat characters as unsigned.
   octave_int (char c)
     : ival (octave_int_base<T>::truncate_int (static_cast<unsigned char> (c)))
   { }
+#endif
 
   octave_int (double d) : ival (octave_int_base<T>::convert_real (d)) { }