C++11 is only needed for the color constants

Allow compiling with C++98, so long as they aren't included
This commit is contained in:
Peter0x44 2023-09-14 22:11:30 +01:00
parent b7d8490086
commit 497f41bdc4
No known key found for this signature in database
GPG Key ID: 61D477F61F3364B3

View File

@ -143,7 +143,7 @@
// Some compilers (mostly macos clang) default to C++98, // Some compilers (mostly macos clang) default to C++98,
// where aggregate initialization can't be used // where aggregate initialization can't be used
// So, give a more clear error stating how to fix this // So, give a more clear error stating how to fix this
#if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L) #if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L) && !defined(RL_NO_COLOR_CONSTANTS)
#error "C++11 or later is required. Add -std=c++11" #error "C++11 or later is required. Add -std=c++11"
#endif #endif