[ox/std] Make toStr(Error)'s return type template-able
This commit is contained in:
parent
e90d6da01b
commit
1372ea9bc9
3
deps/ox/src/ox/std/error.hpp
vendored
3
deps/ox/src/ox/std/error.hpp
vendored
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user