comparison libinterp/corefcn/mex.cc @ 31383:fa025af77216

Array: Export constructor that is needed in different library (bug #61711). * liboctave/array/Array.h (Array::Array): Mark constructor with custom allocator for dllexport. * liboctave/array/Array.cc (Array::Array): Move definition of that constructor here. * libinterp/corefcn/mex.cc: Do not include "Array.cc". We no longer need to implicitly instantiate the Array template class in liboctinterp with types that are exported (with spezializations) from liboctave.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 01 Nov 2022 12:19:33 +0100
parents 8dc9508b8364
children e88a07dec498
comparison
equal deleted inserted replaced
31382:cad5406329be 31383:fa025af77216
44 # include <memory_resource> 44 # include <memory_resource>
45 #endif 45 #endif
46 #include <set> 46 #include <set>
47 #include <string> 47 #include <string>
48 48
49 #if defined (OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR)
50 // Needed to instantiate Array objects with custom allocator.
51 # include "Array.cc"
52 #endif
53 #include "f77-fcn.h" 49 #include "f77-fcn.h"
54 #include "lo-ieee.h" 50 #include "lo-ieee.h"
55 #include "oct-locbuf.h" 51 #include "oct-locbuf.h"
56 #include "quit.h" 52 #include "quit.h"
57 53
72 #include "parse.h" 68 #include "parse.h"
73 #include "unwind-prot.h" 69 #include "unwind-prot.h"
74 #include "utils.h" 70 #include "utils.h"
75 #include "variables.h" 71 #include "variables.h"
76 #include "graphics.h" 72 #include "graphics.h"
77
78
79 // Prevent implicit instantiations without the necessary specializations
80 // on some platforms (Windows, others?).
81
82 extern template class Array<Complex>;
83 extern template class Array<FloatComplex>;
84 extern template class Array<bool>;
85 extern template class Array<char>;
86 extern template class Array<double>;
87 extern template class Array<float>;
88 extern template class Array<octave::idx_vector>;
89 extern template class Array<octave_idx_type>;
90 extern template class Array<std::string>;
91
92 73
93 // These must be declared extern "C" but may be omitted from the set of 74 // These must be declared extern "C" but may be omitted from the set of
94 // symbols declared in mexproto.h, so we declare them here as well. 75 // symbols declared in mexproto.h, so we declare them here as well.
95 76
96 extern "C" 77 extern "C"