mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 13:10:26 -04:00
Fix MSVC warning dllexport and extern are incompatible
C4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
This commit is contained in:
parent
c7babea74a
commit
ec734bbe08
@ -37,7 +37,7 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Explained at end of tpropertymap.cpp
|
||||
extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
extern template class TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
||||
namespace TagLib {
|
||||
|
@ -205,5 +205,9 @@ PropertyMap &PropertyMap::operator=(const PropertyMap &other)
|
||||
// Ogg::FieldListMap is used because this will instantiate the same template
|
||||
// Map<String, StringList>. Therefore this template is instantiated here
|
||||
// and declared extern in the headers using it.
|
||||
template class TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
// Suppress warning "needs to have dll-interface to be used by clients",
|
||||
// in the template, TAGLIB_EXPORT cannot be used on the members, therefore
|
||||
// the private implemenation is exported too, but not accessible by clients.
|
||||
#pragma warning(suppress: 4251)
|
||||
template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Explained at end of tpropertymap.cpp
|
||||
extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
extern template class TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
||||
namespace TagLib {
|
||||
|
Loading…
Reference in New Issue
Block a user