Add deduction guide to tl::unexpected (#109)

This commit is contained in:
Jackson
2022-11-24 07:22:17 -05:00
committed by GitHub
parent f5d8f5c462
commit fb0bd6e79d

View File

@@ -147,6 +147,11 @@ private:
E m_val;
};
#ifdef __cpp_deduction_guides
template<class E>
unexpected(E) -> unexpected<E>;
#endif
template <class E>
constexpr bool operator==(const unexpected<E> &lhs, const unexpected<E> &rhs) {
return lhs.value() == rhs.value();