Update to C++20

This commit is contained in:
Alexander Bock
2022-07-19 15:42:31 +02:00
parent 7f7d724f91
commit 1a052f3c8c
14 changed files with 31 additions and 21 deletions
@@ -248,16 +248,18 @@ void RenderableSmallBody::readDataFile(const std::string& filename) {
sequentialLineErrors = 0;
}
catch (std::invalid_argument&) {
const char* errMsg = "Unable to convert field {} to double value "\
"(invalid_argument exception). Ignoring line {}/{} of {}.";
constexpr std::string_view errMsg = "Unable to convert field {} to "
"double value (invalid_argument exception). Ignoring line {}/{} "
"of {}.";
LINFO(fmt::format(
errMsg,
fieldCount, csvLine + 1, numberOfLines, filename
));
}
catch (std::out_of_range&) {
const char* errMsg = "Unable to convert field {} to double value "\
"(out_of_range exception). Ignoring line {}/{} of {}.";
constexpr std::string_view errMsg = "Unable to convert field {} to "
"double value (out_of_range exception). Ignoring line {}/{} of "
"{}.";
LINFO(fmt::format(
errMsg,
fieldCount, csvLine + 1, numberOfLines, filename