Subject: Re: [boost] [outcome] Possible extensions/changes to std::experimental::expected
From: Peter Dimov (lists_at_[hidden])
Date: 2017-05-25 21:34:54


Andrzej Krzemienski wrote:
> Instead, rewrite observer functions like this:
>
> bool has_value() const
> {
> if (BOOST_UNLIKELY(_is_in_empty_state()))
> __builtin_unreachable();

Please no. This is horrible. Actually it's doubly horrible; merely horrible
would be putting the above in value(). In an observer function... it's just
evil.