Don't export container classes from DLLs when using STL containers

Exporting these classes doesn't seem necessary as they only have inline
functions and doing it results in problems with MSVC as it also, apparently,
exports the corresponding specialization of std::vector<T> from the wxWidgets
DLLs which can clash with the use of std::vector<T> in the user code or even
in 3rd party libraries included in wx itself, such as Scintilla, so this
change fixes link errors in "DLL Debug" build configuration when using MSVC.

Closes #10884.
This commit is contained in:
Vadim Zeitlin 2016-02-26 13:10:59 +01:00
parent 07a2fd0162
commit c4907129f4

View File

@ -114,7 +114,7 @@ private:
_WX_DECLARE_BASEARRAY_2(T, name, name##_Predicate, classexp)
#define _WX_DECLARE_BASEARRAY_2(T, name, predicate, classexp) \
classexp name : public std::vector<T> \
class name : public std::vector<T> \
{ \
typedef predicate Predicate; \
typedef predicate::CMPFUNC SCMPFUNC; \