Mercurial > octave
changeset 31378:8dc9508b8364
Fix sorting with NaN values on Windows with visibility flags (bug #61711).
* libinterp/corefcn/mex.cc: Prevent implicitly instantiating some Array classes
without their specializations from the liboctave library.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Mon, 31 Oct 2022 19:27:17 +0100 |
parents | b0dc52c6a9ee |
children | 84fa33608593 |
files | libinterp/corefcn/mex.cc |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/mex.cc Mon Oct 31 10:03:20 2022 -0700 +++ b/libinterp/corefcn/mex.cc Mon Oct 31 19:27:17 2022 +0100 @@ -46,8 +46,10 @@ #include <set> #include <string> +#if defined (OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR) // Needed to instantiate Array objects with custom allocator. -#include "Array.cc" +# include "Array.cc" +#endif #include "f77-fcn.h" #include "lo-ieee.h" #include "oct-locbuf.h" @@ -73,6 +75,21 @@ #include "variables.h" #include "graphics.h" + +// Prevent implicit instantiations without the necessary specializations +// on some platforms (Windows, others?). + +extern template class Array<Complex>; +extern template class Array<FloatComplex>; +extern template class Array<bool>; +extern template class Array<char>; +extern template class Array<double>; +extern template class Array<float>; +extern template class Array<octave::idx_vector>; +extern template class Array<octave_idx_type>; +extern template class Array<std::string>; + + // These must be declared extern "C" but may be omitted from the set of // symbols declared in mexproto.h, so we declare them here as well.