# HG changeset patch # User Markus Mützel # Date 1610040858 -3600 # Thu Jan 07 18:34:18 2021 +0100 # Node ID dc524fd60c0e415a57d579ec8a890f96503fc422 # Parent 62198e9d525f9c5f6ca27865aef15d54a1c7f81f Visibility: Forward declare template classes with visibility attributes (patch #8919). * Array.h, MArray.h, Sparse.h: Forward declare template classes with visibility attributes before template class definition. diff -r 62198e9d525f -r dc524fd60c0e liboctave/array/Array.h --- a/liboctave/array/Array.h Thu Jan 07 18:02:15 2021 +0100 +++ b/liboctave/array/Array.h Thu Jan 07 18:34:18 2021 +0100 @@ -122,6 +122,9 @@ //! - string_vector: Array with 1 column //! - Cell: Array, equivalent to an Octave cell. +// forward declare template with visibility attribute +template class OCTARRAY_API Array; + template class Array diff -r 62198e9d525f -r dc524fd60c0e liboctave/array/MArray.h --- a/liboctave/array/MArray.h Thu Jan 07 18:02:15 2021 +0100 +++ b/liboctave/array/MArray.h Thu Jan 07 18:34:18 2021 +0100 @@ -31,7 +31,8 @@ #include "Array.h" #include "mx-inlines.cc" -template class MArray; +// forward declare template with visibility attribute +template class OCTAVE_API MArray; template MArray& operator += (MArray&, const T&); template MArray& operator -= (MArray&, const T&); diff -r 62198e9d525f -r dc524fd60c0e liboctave/array/Sparse.h --- a/liboctave/array/Sparse.h Thu Jan 07 18:02:15 2021 +0100 +++ b/liboctave/array/Sparse.h Thu Jan 07 18:34:18 2021 +0100 @@ -43,6 +43,9 @@ // Two dimensional sparse class. Handles the reference counting for // all the derived classes. +// forward declare template with visibility attribute +template class OCTAVE_API Sparse; + template class Sparse