mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Create separate dllexport marking points for clang and msvc. (#2229)
* add FMT_INSTANTIATION_DEF_API for msvc This should fix https://github.com/fmtlib/fmt/issues/2228 To fix difference dllexport requirements msvc: dllexport at template instantiation definition in format.cc clang: dllexport at template instantiation declaration (extern template) in format.h
This commit is contained in:
@@ -233,8 +233,19 @@
|
||||
#ifndef FMT_EXTERN_TEMPLATE_API
|
||||
# define FMT_EXTERN_TEMPLATE_API
|
||||
#endif
|
||||
#ifndef FMT_INSTANTIATION_DECL_API
|
||||
# define FMT_INSTANTIATION_DECL_API FMT_API
|
||||
#ifndef FMT_INSTANTIATION_DECL_API // clang marks dllexport at extern template.
|
||||
# ifndef _MSC_VER
|
||||
# define FMT_INSTANTIATION_DECL_API FMT_API
|
||||
# else
|
||||
# define FMT_INSTANTIATION_DECL_API
|
||||
# endif
|
||||
#endif
|
||||
#ifndef FMT_INSTANTIATION_DEF_API // msvc marks dllexport at the definition itself.
|
||||
# ifndef _MSC_VER
|
||||
# define FMT_INSTANTIATION_DEF_API
|
||||
# else
|
||||
# define FMT_INSTANTIATION_DEF_API FMT_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FMT_HEADER_ONLY
|
||||
|
||||
Reference in New Issue
Block a user