19 const std::string &message,
28 std::ostringstream formatted_message;
32 formatted_message << file <<
'(' << line <<
"): ";
35 formatted_message <<
"error: ";
37 formatted_message <<
"warning: ";
39 formatted_message << message;
41 const auto full_path = location.
full_path();
43 if(full_path.has_value() && !line.empty())
46 std::ifstream in(
widen(full_path.value()));
48 std::ifstream in(full_path.value());
52 const auto line_number = std::stoull(line);
53 std::string source_line;
54 for(std::size_t l = 0; l < line_number; l++)
55 std::getline(in, source_line);
59 formatted_message <<
'\n';
60 formatted_message << file <<
'(' << line <<
"): " << source_line;