forked from TartanLlama/expected
Add deduction guide to tl::unexpected (#109)
This commit is contained in:
@@ -147,6 +147,11 @@ private:
|
|||||||
E m_val;
|
E m_val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __cpp_deduction_guides
|
||||||
|
template<class E>
|
||||||
|
unexpected(E) -> unexpected<E>;
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class E>
|
template <class E>
|
||||||
constexpr bool operator==(const unexpected<E> &lhs, const unexpected<E> &rhs) {
|
constexpr bool operator==(const unexpected<E> &lhs, const unexpected<E> &rhs) {
|
||||||
return lhs.value() == rhs.value();
|
return lhs.value() == rhs.value();
|
||||||
|
Reference in New Issue
Block a user