[ox/std] Make toStr(Error)'s return type template-able

This commit is contained in:
Gary Talent 2022-03-05 11:37:55 -06:00
parent e90d6da01b
commit 1372ea9bc9

View File

@ -75,9 +75,10 @@ struct [[nodiscard]] Error {
}; };
template<typename T=const char*>
[[nodiscard]] [[nodiscard]]
constexpr auto toStr(const Error &err) noexcept { constexpr auto toStr(const Error &err) noexcept {
return err.msg; return T(err.msg);
} }
struct Exception: public std::exception { struct Exception: public std::exception {