MSVC Error C2131: Cannot define constexpr std::strings. So, AnsiEscapeCodes is left out of the library when compiled with Microsoft Compiler until a decent fix can be formulated.

This commit is contained in:
2025-05-20 00:34:26 -05:00
parent 2c52899c34
commit d8d6ad5edc

View File

@@ -56,6 +56,8 @@ namespace mcolor
// TODO: Refactor to constexpr string literals
#ifndef _MSC_VER
constexpr std::string AnsiEscapePrefix = "\033[";
namespace AnsiEscapeCodes {
@@ -225,6 +227,7 @@ namespace mcolor
constexpr std::string EnableAltBuffer = AnsiEscapePrefix + "?1049h";
constexpr std::string DisableAltBuffer = AnsiEscapePrefix + "?1049l";
#pragma endregion
}
}
#endif
}