31 May
2017
31 May
'17
3:19 p.m.
Andrzej Krzemienski wrote:
What when `if_empty() == true`?
Nothing, I don't have an empty state.
Proposed additional narrow:
// nullptr when !has_value(), otherwise &value_ T* operator->() noexcept; T const* operator->() const noexcept;
This is not narrow: this is wide. I disagree.
Why do you disagree?
// *operator->() T& operator() & noexcept; T const& operator() const & noexcept; T&& operator() && noexcept; T const&& operator() const && noexcept;
This is operator*, right? This is technically narrow, but without essential benefits of direct narrow contract, as I tried to explain in another thread. I disagree.
What essential benefits are lost?