Changed to use concepts instead of static_assert

This commit is contained in:
Pasha Bibko
2025-05-07 19:43:09 +01:00
parent 98fc4589ab
commit c472cb5fc5
11 changed files with 65 additions and 47 deletions

View File

@@ -19,15 +19,15 @@ namespace LX
// Prints the error with the relevant information to the console //
std::cout << "\n";
LX::PrintStringAsColor("Error: ", LX::Color::LIGHT_RED);
PrintAsColor<Color::LIGHT_RED>("Error: ");
std::cout << "Invalid character found in ";
LX::PrintStringAsColor(file, LX::Color::WHITE);
PrintAsColor<Color::WHITE>(file);
std::cout << " {";
LX::PrintStringAsColor(std::string(1, invalid), LX::Color::LIGHT_RED);
PrintAsColor<Color::LIGHT_RED>(std::string(1, invalid));
std::cout << "}:\n";
std::cout << "Line: " << std::setw(lineNumberWidthInConsole) << line << " | " << lineContents << "\n";
std::cout << " " << std::setw(lineNumberWidthInConsole) << "" << " | " << std::setw(col - 1) << "";
LX::PrintStringAsColor("^", LX::Color::LIGHT_RED);
PrintAsColor<Color::LIGHT_RED>("^");
std::cout << "\n";
}