Boost logo

Boost :

Subject: Re: [boost] [outcome v2] Please comment on new result<T, EC> reference API docs
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-21 21:49:46

Niall Douglas wrote:
> More importantly though, is that reference API documentation what people
> were looking for? With clauses for effects, requires, throws etc?

Yes, this is the style the C++ standard uses.

> Do I need to write more detail for the APIs, or is what is there enough?

You could be more detailed in places. For example,

Function template outcome::policy::throw_directly::narrow_value_check

template <class Impl>
static constexpr void narrow_value_check(Impl* self) noexcept;

Performs a narrow check of state, used in the assume_value() functions

You have to say what happens, that is, you're missing the Effects clause

Another minor comment:


This is usually written as

noexcept(is_nothrow_constructible_v<value_type, T> &&
is_nothrow_constructible_v<error_type, U>);

If you haven't, you could look at the C++ standard to get an idea of how it
specifies things, for example here:

SmartPtr uses a similar style too, f.ex. here:

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