From fb0bd6e79d4dd2b6ba736989a94c0e7bdf307f1b Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 24 Nov 2022 07:22:17 -0500 Subject: [PATCH] Add deduction guide to tl::unexpected (#109) --- include/tl/expected.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/tl/expected.hpp b/include/tl/expected.hpp index 7dd82b7..9bc01b1 100644 --- a/include/tl/expected.hpp +++ b/include/tl/expected.hpp @@ -147,6 +147,11 @@ private: E m_val; }; +#ifdef __cpp_deduction_guides +template +unexpected(E) -> unexpected; +#endif + template constexpr bool operator==(const unexpected &lhs, const unexpected &rhs) { return lhs.value() == rhs.value();