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

(synced from 1372ea9bc9)
This commit is contained in:
2022-03-05 11:37:55 -06:00
parent 6449eb3bfd
commit 2a86e91d7b
+2 -1
View File
@@ -75,9 +75,10 @@ struct [[nodiscard]] Error {
};
template<typename T=const char*>
[[nodiscard]]
constexpr auto toStr(const Error &err) noexcept {
return err.msg;
return T(err.msg);
}
struct Exception: public std::exception {