diff --git a/expected.hpp b/expected.hpp index f35dbae..145af04 100644 --- a/expected.hpp +++ b/expected.hpp @@ -527,11 +527,11 @@ struct expected_operations_base : expected_storage_base { constexpr const T &&get() const && { return std::move(this->m_val); } #endif - TL_EXPECTED_11_CONSTEXPR T &geterr() & { return this->m_unexpect; } - constexpr const T &geterr() const & { return this->m_unexpect; } - TL_EXPECTED_11_CONSTEXPR T &&geterr() && { std::move(this->m_unexpect); } + TL_EXPECTED_11_CONSTEXPR unexpected &geterr() & { return this->m_unexpect; } + constexpr const unexpected &geterr() const & { return this->m_unexpect; } + TL_EXPECTED_11_CONSTEXPR unexpected &&geterr() && { std::move(this->m_unexpect); } #ifndef TL_EXPECTED_NO_CONSTRR - constexpr const T &&geterr() const && { return std::move(this->m_unexpect); } + constexpr const unexpected &&geterr() const && { return std::move(this->m_unexpect); } #endif };