fix bug: compilation failure on linux (missing noexcept for exception types)

This commit is contained in:
jie 2021-11-27 09:22:57 +08:00
parent 97552e178e
commit a99694866c
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ namespace bserv {
class unsupported_json_value_type : public std::exception {
public:
unsupported_json_value_type() = default;
const char* what() const { return "unsupported json value type"; }
const char* what() const noexcept { return "unsupported json value type"; }
};
template <>

View File

@ -68,7 +68,7 @@ namespace bserv::utils {
public:
file_not_found(const std::string& filename)
: msg_{ std::string{ "'" } + filename + "' does not exist" } {}
const char* what() const { return msg_.c_str(); }
const char* what() const noexcept { return msg_.c_str(); }
};
std::string read_bin(const std::string& filename);