From 1372ea9bc94897bd965c85808ee524e949cc535e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 5 Mar 2022 11:37:55 -0600 Subject: [PATCH] [ox/std] Make toStr(Error)'s return type template-able --- deps/ox/src/ox/std/error.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index dd17503b..274d385e 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -75,9 +75,10 @@ struct [[nodiscard]] Error { }; +template [[nodiscard]] constexpr auto toStr(const Error &err) noexcept { - return err.msg; + return T(err.msg); } struct Exception: public std::exception {