Add FMT_EXTERN_TEMPLATE_API for designate DLL export extern template
When exporting DLL, do not designate `__declspec(dllexport)` any template that has any explicit class template declaration a.k.a. `extern template`. Instead, designate `__declspec(dllexport)` at single point where we have explicit class template definition a.k.a. normal instantiation without `extern` Note: this is a c++11 feature.
This commit is contained in:
parent
e4bd8c1ef2
commit
4f919b83c2
@ -189,11 +189,15 @@
|
||||
# define FMT_API __declspec(dllexport)
|
||||
# elif defined(FMT_SHARED)
|
||||
# define FMT_API __declspec(dllimport)
|
||||
# define FMT_EXTERN_TEMPLATE_API FMT_API
|
||||
# endif
|
||||
#endif
|
||||
#ifndef FMT_API
|
||||
# define FMT_API
|
||||
#endif
|
||||
#ifndef FMT_EXTERN_TEMPLATE_API
|
||||
# define FMT_EXTERN_TEMPLATE_API
|
||||
#endif
|
||||
|
||||
#ifndef FMT_ASSERT
|
||||
# define FMT_ASSERT(condition, message) assert((condition) && message)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user