| 5 | #include <format> |
| 6 | |
| 7 | void logError(std::string_view message, |
| 8 | std::source_location location = std::source_location::current()) |
| 9 | { |
| 10 | std::cerr << std::format("{}:{}:{} - An unexpected error occurred in {}: {}", |
| 11 | location.file_name(), location.line(), location.column(), |
| 12 | location.function_name(), message) << std::endl; |
| 13 | } |
| 14 | |
| 15 | int main() |
| 16 | { |