Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squelch MSVC warning exporting subclasses of runtime_error (fix for PR …
…#1433) (#1470) * 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. * Fix compilation with MinGW Commit 3bc28fc ("Squelch MSVC warning exporting subclasses of runtime_error", 2019-11-29) silenced a MSVC warning under. The MinGW compiler also defines _WIN32, but does not support the "warning" pragma. Introduce a helper macro to squelch the MSVC warning only when using the Microsoft compiler. Signed-off-by: Beat Bolli <[email protected]> * Fix compilation with VS2015 (#1450) VS2015 does not support the __pragma(...) syntax in the midst of a class declaration, so move it to just before the declaration.
- Loading branch information