mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Squelch MSVC warning exporting subclasses of runtime_error
When compiling {fmt} as a DLL, MSVC complains that we are exporting classes that inherit from "std::runtime_error", which we are not exporting. In this case, it's not really a problem because that symbol is already exported via the C++ stdlib. So we just add a pragma to silence the warning.
This commit is contained in:
parent
3c05fa46c6
commit
3bc28fcc6b
@ -167,9 +167,9 @@
|
||||
|
||||
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
||||
# ifdef FMT_EXPORT
|
||||
# define FMT_API __declspec(dllexport)
|
||||
# define FMT_API __pragma(warning(suppress : 4275)) __declspec(dllexport)
|
||||
# elif defined(FMT_SHARED)
|
||||
# define FMT_API __declspec(dllimport)
|
||||
# define FMT_API __pragma(warning(suppress : 4275)) __declspec(dllimport)
|
||||
# define FMT_EXTERN_TEMPLATE_API FMT_API
|
||||
# endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user