diff --git a/tl/expected.hpp b/tl/expected.hpp index a4d9d62..3417f8c 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -1134,7 +1134,9 @@ class expected : private detail::expected_move_assign_base, static_assert(!std::is_reference::value, "E must not be a reference"); T *valptr() { return std::addressof(this->m_val); } + const T *valptr() const { return std::addressof(this->m_val); } unexpected *errptr() { return std::addressof(this->m_unexpect); } + const unexpected *errptr() const { return std::addressof(this->m_unexpect); } template ::value> * = nullptr>