diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 8626a5004..3df34840d 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -111,6 +111,14 @@ #endif +//////////////////////////////////////////////////////////// +// Ensure minimum C++ language standard version is met +//////////////////////////////////////////////////////////// +#if (defined(_MSVC_LANG) && _MSVC_LANG < 201703L) || (!defined(_MSVC_LANG) && __cplusplus < 201703L) +#error "Enable C++17 or newer for your compiler (e.g. -std=c++17 for GCC/Clang or /std:c++17 for MSVC)" +#endif + + //////////////////////////////////////////////////////////// // Portable debug macro ////////////////////////////////////////////////////////////