From 4378a022e5450ab44c391934822f92dbb0e2c7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Tue, 28 Jan 2025 23:39:42 +0100 Subject: [PATCH] Silence C4275 warning for sf::Exception Warning is not relevant when deriving from standard library types as the documentation states: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275 --- include/SFML/Config.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 30cc8cb8b..8004df471 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -140,10 +140,11 @@ #define SFML_API_EXPORT __declspec(dllexport) #define SFML_API_IMPORT __declspec(dllimport) -// For Visual C++ compilers, we also need to turn off this annoying C4251 warning +// For Visual C++ compilers, we also need to turn off this annoying C4251 & C4275 warning #ifdef _MSC_VER -#pragma warning(disable : 4251) +#pragma warning(disable : 4251) // Using standard library types in our own exported types is okay +#pragma warning(disable : 4275) // Exporting types derived from the standard library is okay #endif