Commit 3bc28fcc authored by Chris Martin's avatar Chris Martin Committed by Victor Zverovich

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.
parent 3c05fa46
...@@ -167,9 +167,9 @@ ...@@ -167,9 +167,9 @@
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32) #if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
# ifdef FMT_EXPORT # ifdef FMT_EXPORT
# define FMT_API __declspec(dllexport) # define FMT_API __pragma(warning(suppress : 4275)) __declspec(dllexport)
# elif defined(FMT_SHARED) # 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 # define FMT_EXTERN_TEMPLATE_API FMT_API
# endif # endif
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment