mirror of
https://github.com/taglib/taglib.git
synced 2025-07-26 17:04:28 -04:00
Fix MSVC warning needs to have dll-interface (#1185)
Unfortunately, MSVC exports everything (not only public members) when __declspec(dllexport) is set at the class level via TAGLIB_EXPORT, which leads to many "needs to have dll-interface to be used by clients" 4251 warnings issued by MSVC, because the std::unique_ptr pimpls are exported too. As it is not possible to "unexport" private members, such a warning has to be explicitly suppressed for these cases or all public and protected class member now have to be exported for classes derived from a template (StringList, ByteVectorList, PropertyMap).
This commit is contained in:
@ -137,6 +137,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class TagPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<TagPrivate> d;
|
||||
};
|
||||
} // namespace DIIN
|
||||
|
@ -283,6 +283,7 @@ namespace TagLib {
|
||||
unsigned int leadingPadding = 0);
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
} // namespace DSDIFF
|
||||
|
@ -70,6 +70,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class PropertiesPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PropertiesPrivate> d;
|
||||
};
|
||||
} // namespace DSDIFF
|
||||
|
Reference in New Issue
Block a user