23 May
2017
23 May
'17
2:45 p.m.
2017-05-23 16:03 GMT+02:00 Peter Dimov via Boost
Andrzej Krzemienski wrote:
On the other hand, empty state is not something inherited from
`option<T>`. It is simply that you need it to have a simple implementation of `result<T>`. What would a default-constructed `result<T>` do?
The usual approach is to default-construct a T, although in the course of this review I came to the conclusion that there's a strong argument to be made for constructing make_error_code( uninitialized_result ) instead.
:) yes, you already have an "empty" state. Even in `std::expected`. Regards, &rzej;