Boost logo

Boost :

Subject: Re: [boost] [review] Review of Outcome (starts Fri-19-May)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-05-19 13:08:00

>> The constexpr variables are already there. So basically do we prefer:
>> 1. .ensure_empty(), .ensure_value(), .ensure_error() and
>> .ensure_exception()
>> 2. Or .ensure(empty), .ensure(value), .ensure(error) and .ensure(exception)
>> I figure the latter looked nicer. It's same difference to the compiler,
>> simple overload matching is constant time.
> Just one note. If I use namspace prefixes, the notation with "constants"
> becomes longer:
> `o.ensure_empty()` becomes `o.ensure(boost::outcome::empty)`
> One could respond to this "just import anything from namespace
> `boost::outcome` into the scope", but that is imposing on me a certain
> style of programming, which I not necessarily want to adapt.

Yes that's a good point.

Also, after a few nights of sleeping on it, I'm not keen on .ensure_XXX().

Would people be okay with:

* o.check() <= (void) o.value()

* o.check_error() <= (void) o.error()

* o.check_exception() <= (void) o.exception()


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at