changeset 22116:03e30a5d6e0d

skip explicit instantiations of xmin and xmax if they are not defined * MArray-i.cc, MArray-s.cc: Only instantiate xmin and xmax if OCTAVE_USE_DEPRECATED_FUNCTIONS is defined.
author John W. Eaton <jwe@octave.org>
date Fri, 15 Jul 2016 10:40:58 -0400
parents b017351e92e1
children 9b832e9caae6
files liboctave/array/MArray-i.cc liboctave/array/MArray-s.cc
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/MArray-i.cc	Fri Jul 15 10:37:48 2016 -0400
+++ b/liboctave/array/MArray-i.cc	Fri Jul 15 10:40:58 2016 -0400
@@ -36,12 +36,14 @@
 template class OCTAVE_API MArray<int64_t>;
 #endif
 
+#if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
 // Explicit instantiation, as this seems to be required by weird compilers
 // like MSVC.  This should be harmless on other compilers.
 template int xmin<int> (int, int);
 template int xmax<int> (int, int);
 template long xmin<long> (long, long);
 template long xmax<long> (long, long);
+#endif
 
 INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_API)
 #if defined (OCTAVE_ENABLE_64)
--- a/liboctave/array/MArray-s.cc	Fri Jul 15 10:37:48 2016 -0400
+++ b/liboctave/array/MArray-s.cc	Fri Jul 15 10:40:58 2016 -0400
@@ -31,10 +31,12 @@
 
 template class OCTAVE_API MArray<short>;
 
+#if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
 // Explicit instantiation, as this seems to be required by weird compilers
 // like MSVC.  This should be harmless on other compilers.
 template short xmin<short> (short, short);
 template short xmax<short> (short, short);
+#endif
 
 INSTANTIATE_MARRAY_FRIENDS (short, OCTAVE_API)