23 May
2017
23 May
'17
2:03 p.m.
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.