correct declaration

This commit is contained in:
Axel Kohlmeyer
2021-04-25 21:02:01 -04:00
parent 831b0fb70f
commit 4cbe6200d6
2 changed files with 4 additions and 1 deletions

View File

@ -225,6 +225,7 @@ void Error::_all(const std::string &file, int line, fmt::string_view format,
} catch (fmt::format_error &e) {
all(file,line,e.what());
}
exit(1); // to trick "smart" compilers into believing this does not return
}
void Error::_one(const std::string &file, int line, fmt::string_view format,
@ -235,6 +236,7 @@ void Error::_one(const std::string &file, int line, fmt::string_view format,
} catch (fmt::format_error &e) {
one(file,line,e.what());
}
exit(1); // to trick "smart" compilers into believing this does not return
}
/* ----------------------------------------------------------------------

View File

@ -56,12 +56,13 @@ class Error : protected Pointers {
std::string last_error_message;
ErrorType last_error_type;
#endif
private:
// internal versions that accept explicit fmtlib arguments
[[ noreturn ]] void _all(const std::string &, int, fmt::string_view,
fmt::format_args args);
[[ noreturn ]] void _one(const std::string &, int, fmt::string_view,
fmt::format_args args);
#endif
};
}