Mercurial > hg > octave-lyh
changeset 13732:f8bef53122c8
[MSVC] Explicit instantiation to avoid undefined references.
* MArray-i.cc (xmin<int>, xmax<int>): Explicit instantiation.
(xmin<long>, xmax<long>): Likewise.
* MArray-s.cc (xmin<short>, xmax<short>): Likewise.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 20 Oct 2011 12:54:46 +0100 |
parents | 3b52038e6e6c |
children | b1186adb567e |
files | liboctave/MArray-i.cc liboctave/MArray-s.cc |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/MArray-i.cc +++ b/liboctave/MArray-i.cc @@ -34,6 +34,13 @@ template class OCTAVE_API MArray<int>; template class OCTAVE_API MArray<long>; +// 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); + INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (long, OCTAVE_API)
--- a/liboctave/MArray-s.cc +++ b/liboctave/MArray-s.cc @@ -31,6 +31,11 @@ template class OCTAVE_API MArray<short>; +// 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); + INSTANTIATE_MARRAY_FRIENDS (short, OCTAVE_API) #include "MDiagArray2.h"