# HG changeset patch # User Michael Goffioul # Date 1319111686 -3600 # Node ID f8bef53122c84cd59c6955760ce3929e70e387fa # Parent 3b52038e6e6c109689d3596f92412ddf4cd20a91 [MSVC] Explicit instantiation to avoid undefined references. * MArray-i.cc (xmin, xmax): Explicit instantiation. (xmin, xmax): Likewise. * MArray-s.cc (xmin, xmax): Likewise. diff -r 3b52038e6e6c -r f8bef53122c8 liboctave/MArray-i.cc --- a/liboctave/MArray-i.cc Thu Oct 20 12:54:40 2011 +0100 +++ b/liboctave/MArray-i.cc Thu Oct 20 12:54:46 2011 +0100 @@ -34,6 +34,13 @@ template class OCTAVE_API MArray; template class OCTAVE_API MArray; +// 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); +template int xmax (int, int); +template long xmin (long, long); +template long xmax (long, long); + INSTANTIATE_MARRAY_FRIENDS (int, OCTAVE_API) INSTANTIATE_MARRAY_FRIENDS (long, OCTAVE_API) diff -r 3b52038e6e6c -r f8bef53122c8 liboctave/MArray-s.cc --- a/liboctave/MArray-s.cc Thu Oct 20 12:54:40 2011 +0100 +++ b/liboctave/MArray-s.cc Thu Oct 20 12:54:46 2011 +0100 @@ -31,6 +31,11 @@ template class OCTAVE_API MArray; +// 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); +template short xmax (short, short); + INSTANTIATE_MARRAY_FRIENDS (short, OCTAVE_API) #include "MDiagArray2.h"